[comp.lang.eiffel] Repeated Inheritance

bl@tnoibbc.UUCP (Bart Luijten) (11/20/90)

Hello,

We are having some problems with the repeated inheritance mechanism in
EIFFEL. We have reduced the problem to the following two classes DAD and 
SON. The class SON inherits twice from the class DAD (this is hypothetic,
of course!). The classes DAD and SON are listed below:

	class DAD 
	export
  	  Number
	feature
  	  List: LINKED_LIST[INTEGER];
    	  Create is
    	    do
      	      List.Create
    	    end;
  	  Number: INTEGER is
    	    do
      	      Result := List.Count
    	    end;
	end -- class DAD

	class SON 
	export
  	  Number1, Number2
	inherit
  	  DAD
    	    rename List as List1,
	           Number as Number1;
  	  DAD
    	    rename List as List2,
	   	   Number as Number2
	feature
  	  Create is
    	    do
      	      List1.Create;
      	      List2.Create
    	    end;
	end -- class SON

When we try to compile the class SON, we get the following error message:

	Pass 2 on class son
	Repeated inheritance - Duplicated feature: number2
		(Original feature: number in class dad )
	"son", 15: Remote notation may not be used in routine number2
		that is replicated under repeated inheritance.
	Fatal error. Cannot resume.

	*** ec: pass2 canceled

If anyone has seen this problem before, and has found a solution or
can tell us if this is a bug, we would like to know. (A request like
this was posted by us on Fri Nov 16).

Bart Luiten and Bart Luijten (this is no joke!)

-- 
Bart "DiBarto" Luijten: TNO - IBBC                    INTERNET : bl@tnoibbc
                      : PO-box 49                     DOMAIN   : bl@ibbc.tno.nl
                      : 2600 AA  Delft                FAX      : +31 15 843990
                      : the Netherlands               VOICE    : +31 15 842357