[Issue 1515] compiler accepts invalid template declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 21 11:03:40 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=1515

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
The template is not semantically analyzed before instantiation, it is only
parsed, so the compiler cannot reject the template definition before actually
instantiating it. This is clearly stated in the spec. The error message points
this out: "mixin test.B!(A!int) does not match template declaration B(T :
A!T)".

Closing as WONTFIX.

--


More information about the Digitalmars-d-bugs mailing list