[Issue 13823] New: Diagnostic for accessing wrongly-instantiated templated aggregate needs to improve
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Dec 5 14:17:06 PST 2014
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 at puremagic.com
Reporter: andrej.mitrovich at 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.
--
More information about the Digitalmars-d-bugs
mailing list