[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extending Open Generics




Am Mittwoch den, 4. Dezember 2002, um 00:25, schrieb Rob Myers:

> I define an open generic in a module, define a method on that generic, 
> and export the name.
>
> 	define /*exported*/ open generic size( object :: <object> )
> 	=> ( size :: <object> );
>
> 	define /*exported*/ method size( object :: <NSRect> )
> 	=> ( size :: <NSSize> )...
>
> I use the module in another module, and define another method there.
>
> 	define /*exported*/ method size( self :: <NSImageRep> )
> 	=> ( result :: <NSSize>)...
>
> And d2c gives me the error:
>
> 	In Define Module cocoa-wrappers.:
> 	Error: Can't import size from module cocoa-basics into module 
> cocoa-wrappers
> 	because it would clash with size defined inside module cocoa-wrappers.
>
> I thought you could extend open generics in other modules? What am I 
> doing wrong?

Did you consider the \size generic in the dylan module?

This might be the solution. The error message seems to say something 
different though...

	Gabor

>
> - Rob.
>