Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mcgill-vision!clyde!concour!marcap From: marcap@concour.CS.Concordia.CA (Marc Pawlowsky) Newsgroups: comp.lang.eiffel Subject: generic inheritence bug Message-ID: <1340@clyde.Concordia.CA> Date: 7 Oct 89 23:14:08 GMT Sender: sccs@Clyde.Concordia.CA Reply-To: marcap@concour.CS.Concordia.CA (Marc Pawlowsky) Organization: Concordia University, Montreal Quebec Lines: 105 I believe I have found a bug in the inheritance system of Eiffel 2.1. I am working on s Sun 3/50 under Unix 3.5 (export). The bug(?) is that in the code segment below, the features in C use the features declared in D and not E, even though type P is of class E (which inherits from class D). class C[P->D] export out inherit STD_FILES feature variable: P; out is do variable.out(output); end; -- out Create is do variable.Create; end; end -- C class D export out inherit STD_FILES feature Create is do output.putstring("Creating class D\n"); end; out(f:FILE) is do f.putstring("out class D\n"); end; -- out end -- class D class E export out inherit D redefine out feature Create is do output.putstring("Creating class E\n"); end; out(f:FILE) is do f.putstring("out class E\n"); end; -- out end -- class E class F feature v: C[E]; Create is do v.Create; v.out; end; end -- class F The root is class F and the output is Creating class D` Out class D