Bug 9233 – compiler infinite recursion on nested mixin
Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-12-28T04:27:00Z
Last change time
2012-12-28T23:41:23Z
Assigned to
nobody
Creator
luka8088
Comments
Comment #0 by luka8088 — 2012-12-28T04:27:50Z
The following code causes dmd compiler to infinitely allocate new memory with high cpu load, so I suspect a infinite recursion in the compiler.
----------
module program;
mixin template ParentMix () {
mixin template ChildMix (alias PMix) {}
}
class A {
mixin ParentMix pmix;
}
mixin A.pmix.ChildMix!(A.pmix);
void main () {}
----------
Comment #1 by k.hara.pg — 2012-12-28T23:39:37Z
The root problem is same as bug 9026, and it is already fixed.
Then, infinitely allocation and high cpu load do not occur with git head.
*** This issue has been marked as a duplicate of issue 9026 ***
Comment #2 by k.hara.pg — 2012-12-28T23:41:23Z
(In reply to comment #1)
> The root problem is same as bug 9026, and it is already fixed.
> Then, infinitely allocation and high cpu load do not occur with git head.
>
> *** This issue has been marked as a duplicate of issue 9026 ***
Finally this issue will have been fixed in 2.061.