Bug 10761 – DMD crashes on unspecified inout matching.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-05T03:45:00Z
Last change time
2013-08-18T16:41:28Z
Keywords
ice, pull
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2013-08-05T03:45:21Z
DMD 2.063.2/head:
inout(int)* foo(inout(int)* a, inout(int)* delegate(inout(int)*) dg){
return dg(a);
}
int b;
const(int) c;
int bar(inout(int)* a, inout(int)* delegate(inout(int)*) dg){
return *dg(a)+*dg(&b)+*dg(&c);
}
void main(){
immutable int a;
// both of the following lines provoque the crash
assert(foo(&a,(typeof(a)* x)=>x) is a);
assert(!bar(&a,(inout(int)* x)=>x));
}
dmd: mtype.c:1894: Type* Type::substWildTo(unsigned int): Assertion `0' failed.
I don't know what the compiler is supposed to do.