The similarity between ichthyosaurs and fish is an example of convergence, a process by which different classes of organisms adapt to the same environment by independently developing one or more similar external body features  Ichthyosaurs were marine reptiles and thus do not belong to the same class of organisms as fish  However, ichthyosaurs adapted to their marine environment by converging on external body features similar to those of fish
Most strikingly, ichthyosaurs, like fish, had fins
An organism does not necessarily belong to a class simply because the organism has one or more external body features similar to those of members of that class.