July 05, 2013 [Issue 10546] New: UFCS hides actual static assert failure in opDispatch | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10546 Summary: UFCS hides actual static assert failure in opDispatch Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: k.hara.pg@gmail.com --- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2013-07-04 23:19:18 PDT --- From: http://forum.dlang.org/post/zxhvyfitqkbvmfseyqxr@forum.dlang.org 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 } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation