dynamic classes and duck typing
Simen kjaeraas
simen.kjaras at gmail.com
Mon Nov 30 13:44:49 PST 2009
On Mon, 30 Nov 2009 19:07:38 +0100, Walter Bright
<newshound1 at digitalmars.com> wrote:
> Simen kjaeraas wrote:
>> This still does not compile:
>> struct foo {
>> void opDispatch( string name, T )( T value ) {
>> }
>> }
>> void main( ) {
>> foo f;
>> f.bar( 3.14 );
>> }
>> test.d(10): Error: template instance opDispatch!("bar") does not match
>> template
>> declaration opDispatch(string name,T)
>
> It works when I try it.
And here. So what are you complaining about? :p
Apparently, my build script was wonky, and didn't update correctly.
I'm already in love with this feature. We're gonna have a beautiful life
together...
--
Simen
More information about the Digitalmars-d
mailing list