Bug 10657 – wrong error message with unexisting symbol

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-16T22:33:36Z
Last change time
2023-12-16T17:21:06Z
Keywords
diagnostic
Assigned to
No Owner
Creator
thelastmammoth

Comments

Comment #0 by thelastmammoth — 2013-07-16T22:33:36Z
version(v1) void fun(T)(T a)if(is(T==unexisting!T)){} //OK: Error: template instance unexisting!(T) template 'unexisting' is not defined version(v2) void fun(T)(T a)if(is(unexisting!T==unexisting!T)){} //NG: Error: template bug_2013_07_16_22_23_32.fun does not match any function template declaration. Candidates are: unittest{ fun(0); }
Comment #1 by k.hara.pg — 2014-07-17T04:10:08Z
At least it's not incorrect behavior. With is(T == U), if T is invalid type, currently U's analysis is entirely skipped for short-circuit evaluation.
Comment #2 by b2.temp — 2023-12-16T17:21:06Z
nowadays output is much better: > /tmp/temp_7F98B13450B0.d(10,6): Error: none of the overloads of template `temp_7F98B13450B0.fun` are callable using argument types `!()(int)` > /tmp/temp_7F98B13450B0.d(6,6): Candidate is: `fun(T)(T a)` > with `T = int` > must satisfy the following constraint: >` is(unexisting!T == unexisting!T)`