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: nob...@puremagic.com
          Reporter: schue...@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/jsofxhqbdoupzbfdh...@forum.dlang.org

--

Reply via email to