Bug 12078 – forward reference issue with is() and curiously recurring template pattern

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-05T00:37:00Z
Last change time
2014-05-16T02:16:21Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2014-02-05T00:37:34Z
In the following repro case, the first static assert will fail, but if you comment it, the second one will succeed. class Base(T) { static assert(is(T : Base!T), "not related"); } class Derived : Base!Derived { } void main(string[] args) { static assert(is(Derived : Base!Derived), "not related 2"); }
Comment #1 by code — 2014-02-05T00:38:35Z
I tested this with both dmd 2.064.2 and dmd 2.065-b3
Comment #2 by k.hara.pg — 2014-04-03T19:36:11Z
Comment #3 by github-bugzilla — 2014-05-16T02:16:15Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/41b2ba393d879613cdb12b05f143bdf4fef35f6a fix Issue 12078 - forward reference issue with is() and curiously recurring template pattern https://github.com/D-Programming-Language/dmd/commit/050707d1b1079bff15f3770fb6b5e8db1015a20a Merge pull request #3384 from 9rnsr/refactor_aggregate Issue 12078 & 12143 & 12555 & 11622 - Separate class hierarchy calculation from class member semantics