Mixin virtual functions -- overloads
Michel Fortin
michel.fortin at michelf.com
Wed Feb 25 04:56:16 PST 2009
On 2009-02-23 18:09:54 -0500, Justin <mrjnewt at gmail.com> said:
> Compilation breaks at the second line with these errors:
> A.d(122): function alias A.BindableProperty.Register called with
> argument types:
> (char[5u],TypeInfo,Duck,uint)
> matches both:
> A.BindableProperty.tRegister!(bool).Register(char[],TypeInfo,BindableObject,bool)
and:
A.BindableProperty.tRegister!(char).Register(char[],TypeInfo,BindableObject,char)
It
>
> shouldn't match either of these, only the uint overload.
I've had the same problem while creating wrapper classes for the
D/Objective-C bridge.
It'd be solved in D2 if overload sets were applying to mixed-in
functions. Anyway, in my case I also had the option of writing the
functions directly in the class when needed (it's more verbose, but
overloading works).
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list