Re: Cannot create deferred object - too restrictive

Peter Gummer <[email protected]> Sat, 3 Dec 2005 09:47:17 +1100
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
Oliver Elphick wrote:

>         deferred class LOOKUP_TABLE[G_ -> LOOKUP_ITEM]
>         ...
>         ****** Fatal Error: Type LOOKUP_ITEM is deferred. (Cannot  
> create
>         object.)
>         Line 53 column 6 in LOOKUP_TABLE (.../lookup_table.e):
>              create g.make_from_query(q)
>              ^

EiffelStudio 5.6 also disallows this. In my opinion, you are right:  
the compilers should not care that G_ is deferred, because G_ will be  
effective in descendants of LOOKUP_TABLE.

Note that in EiffelStudio you have to use generic creation syntax:

         deferred class LOOKUP_TABLE
		[G -> LOOKUP_ITEM create make__from_query end]

Is this required in SmartEiffel too?

- Peter Gummer