Bug 10546 – UFCS hides actual static assert failure in opDispatch

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-04T23:19:00Z
Last change time
2013-11-16T21:06:38Z
Keywords
diagnostic
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-07-04T23:19:18Z
From: http://forum.dlang.org/post/[email protected] struct Fail1 { void opDispatch(string s)() { static assert(false, "Tried to call a method on Fail1"); } } struct Fail2 { void opDispatch(string s, T)(T arg) { static assert(false, "Tried to call a method on Fail2"); } } void main() { auto fail1 = Fail1(); fail1.s(); // "no property" error instead of static asset failure auto fail2 = Fail2(); fail2.s(1); // "no property" error instead of static asset failure }
Comment #1 by yebblies — 2013-11-16T21:06:38Z
*** This issue has been marked as a duplicate of issue 8387 ***