Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!pacbell.com!ames!skipper!belle From: belle@skipper.dfrf.nasa.gov (Steve Belle) Newsgroups: comp.lang.eiffel Subject: Re: Class STRING bug Message-ID: <578@skipper.dfrf.nasa.gov> Date: 24 Jul 90 23:25:45 GMT References: <2339@dover.sps.mot.com> Sender: news@skipper.dfrf.nasa.gov Reply-To: belle@skipper.dfrf.nasa.gov Organization: NASA Ames-Dryden Flight Research Facility, Edwards AFB, CA Lines: 25 In article <2339@dover.sps.mot.com>, shelley@atc.sps.mot.com (Norman K. Shelley) writes: |> class NEW_STRING |> inherit |> STRING; -- notice that Create is not renamed |> feature |> ... |> end; -- NEW_STRING |> |> Object of class NEW_STRING does not use STRING's Create (or allocate) to |> allocate some string storage space. When equal, putstring, etc. are applied to |> this object, the system will crash with a segmentation error! On page 56 of "Eiffel: The Language", it states that "Create is never inherited, as each class usually needs to have its own method for create instances, independent from its parents'." In Eiffel 2.2, the above is not a bug in STRING, but an incorrect implementation of the inheritence mechanism. There is a margin note indicating a change in this mechanism in version 3. Steve Belle belle@skipper.dfrf.nasa.gov