Bug 14722 – Improve "<template> is used as a type" error message
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-06-23T10:18:29Z
Last change time
2018-02-08T12:29:51Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Vladimir Panteleev
Comments
Comment #0 by dlang-bugzilla — 2015-06-23T10:18:29Z
class Foo() {}
Foo f;
Currently, the compiler says:
test.d(2,5): Error: class test.Foo() is used as a type
It should mention that test.Foo() is a template.
Comment #1 by nick — 2018-02-08T12:29:51Z
My recently merged pull fixes this, now you should see:
Error: template class `test.Foo()` is used as a type without instantiation; to instantiate it use `Foo!(arguments)`
https://github.com/dlang/dmd/pull/7769