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]
Comment #1 by k.hara.pg — 2015-03-16T12:36:17Z
Comment #2 by github-bugzilla — 2015-03-18T04:29:10Z
Comment #3 by github-bugzilla — 2015-03-25T09:23:18Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a90c005c971f40bced70257b343419436174e14 fix Issue 14290 - is-expression accepts instantiation of already instantiated template https://github.com/D-Programming-Language/dmd/commit/5c1fedca8a9c7b8b85013f03cb2607469292bbe7 Merge pull request #4499 from 9rnsr/fix14290 Issue 14290 - is-expression accepts instantiation of already instantiated template
Comment #4 by github-bugzilla — 2015-06-17T21:02:16Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a90c005c971f40bced70257b343419436174e14 fix Issue 14290 - is-expression accepts instantiation of already instantiated template https://github.com/D-Programming-Language/dmd/commit/5c1fedca8a9c7b8b85013f03cb2607469292bbe7 Merge pull request #4499 from 9rnsr/fix14290
Comment #5 by github-bugzilla — 2017-07-19T17:42:38Z