[Issue 14290] New: is-expression accepts instantiation of already instantiated template
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Mar 15 13:30:41 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14290
Issue ID: 14290
Summary: is-expression accepts instantiation of already
instantiated template
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: schuetzm at gmx.net
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/jsofxhqbdoupzbfdhxxe@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list