Bug 13823 – Diagnostic for accessing wrongly-instantiated templated aggregate needs to improve

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-05T22:17:00Z
Last change time
2016-04-25T11:15:05Z
Keywords
diagnostic
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2014-12-05T22:17:06Z
----- 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.
Comment #1 by k.hara.pg — 2016-04-25T11:15:05Z
The error message is improved from 2.068: Error: template C(bool b = false) does not have property 'foo'