[Issue 14145] opDispatch should be considered over UFCS

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Feb 7 18:30:43 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14145

Timothee Cour <timothee.cour2 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2 at gmail.com

--- Comment #2 from Timothee Cour <timothee.cour2 at gmail.com> ---
I forgot to mention: the naked 'writeln' was intentional in this bug report.
the error occurs when the template body of opDispatch is not compilable (eg as
in the example, import std.stdio is missing).

The correct behavior IMO should be to say:
error : could not resolve writeln.

Furthermore to counter your argument saying this is not a bug:

replace 'void fun(){}' by 'void foo(A a){}'
now it compiles whereas is shouldn't.

--


More information about the Digitalmars-d-bugs mailing list