Bug 5303 – (mtype.c) Compiler crash caused by pure
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-12-01T12:51:00Z
Last change time
2010-12-01T16:33:51Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2010-12-01T12:51:04Z
struct Foo {}
void bar(T)(Foo* f) pure if(true) {}
void main() {
bar!(int)(null);
}
DMD 2.050 shows:
Assertion failure: 'tn->mod & MODimmutable || tn->mod & MODconst' on line 876 in file 'mtype.c'
If I remove the pure the error vanishes.
Comment #1 by clugdbug — 2010-12-01T16:33:51Z
Could be the most duplicated bug of all time.
*** This issue has been marked as a duplicate of issue 4434 ***