http://d.puremagic.com/issues/show_bug.cgi?id=9272
Simen Kjaeraas <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from Simen Kjaeraas <[email protected]> 2013-01-05 12:19:17 PST --- (In reply to comment #2) > This works, where opDispatch does not take precedence: > --- > struct Foo { > void opDispatch(string s)() {} > } > > void baz(Foo f) {} > > unittest { > Foo foo; > foo.baz(); // OK > } Except, of course, opDispatch *does* take precedence here. Try this instead: import std.stdio : writeln; struct Foo { void opDispatch(string s)() { writeln("opDispatch: ", s); } } void baz(Foo f) { writeln("function: baz"); } void main( ) { Foo foo; foo.baz(); // OK } I can assure you it prints opDispatch: baz. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
