http://d.puremagic.com/issues/show_bug.cgi?id=9272
--- Comment #6 from Nicolas Sicard <[email protected]> 2013-01-06 04:49:57 PST --- (In reply to comment #5) > (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. Ah! I was trapped by the minimalism of my example. OK thanks. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
