digitalmars.D.bugs - [Issue 13823] New: Diagnostic for accessing wrongly-instantiated
- via Digitalmars-d-bugs (26/28) Dec 05 2014 https://issues.dlang.org/show_bug.cgi?id=13823
https://issues.dlang.org/show_bug.cgi?id=13823 Issue ID: 13823 Summary: Diagnostic for accessing wrongly-instantiated templated aggregate needs to improve Product: D Version: D2 Hardware: All OS: Windows Status: NEW Keywords: diagnostic Severity: enhancement Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: andrej.mitrovich gmail.com ----- class C(bool b = false) { static void foo() { } } void main() { C.foo(); } -----Error: no property 'foo' for type 'void'Please don't hijack this issue with requests for "C" to auto-instantiate the template, this is part of a separate enhancement request which already exists. In the meantime, the above should emit something helpful, such as:Error: "C" was not properly instantiated, use C!(...).foo instead.--
Dec 05 2014