Bug 14290 – is-expression accepts instantiation of already instantiated template
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-15T20:30:00Z
Last change time
2017-07-19T17:42:38Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
schuetzm
Comments
Comment #0 by schuetzm — 2015-03-15T20:30:41Z
This compiles:
struct Foo(int i) {}
alias Foo1 = Foo!1;
static assert(is(Foo!2 == Foo1!T, T...));
Foo1 is clearly not a template, therefore the is-expression should fail.
(The alias is needed for syntactic reasons.)
Discovered by Nicolas Sicard:
http://forum.dlang.org/post/[email protected]