digitalmars.D.bugs - [Issue 20078] New: Multiple confusing error messages
- d-bugmail puremagic.com (37/37) Jul 23 2019 https://issues.dlang.org/show_bug.cgi?id=20078
https://issues.dlang.org/show_bug.cgi?id=20078 Issue ID: 20078 Summary: Multiple confusing error messages Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: simen.kjaras gmail.com These functions all have the same underlying issue : struct S { int n; pragma(msg, fun1!(a => n)); pragma(msg, fun2!(a => n)); pragma(msg, fun3!(a => n)); } // Error: value of this is not known at compile time int fun1(Fn...)() { alias F = Fn[0]; pragma(msg, F(0)); return 0; } // Error: this.__lambda2 has no value int fun2(Fn...)() { pragma(msg, Fn[0](0)); return 0; } // Error: function `foo.S.fun3!((a) => a).fun3` need this to access member fun3 int fun3(alias Fn)() { return Fn(0); } However, as indicated by the comments, the error messages are wildly different. --
Jul 23 2019