[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Extending Open Generics
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?
- Rob.