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