Bug 11460 – ICE for opDispatch and UFCS function (2.064)
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-06T23:26:00Z
Last change time
2015-06-23T18:30:32Z
Assigned to
nobody
Creator
daniel350
Comments
Comment #0 by daniel350 — 2013-11-06T23:26:20Z
import std.algorithm : all;
auto func(in foo v) {
return 0;
}
struct foo {
float x;
auto opDispatch(string str)() if (str.all!(x => false)) {
return this;
}
}
void main() {
foo(1).func();
// func(foo(1)); // Fine
}
The above code produces the following ICE: dmd: glue.c:598: virtual void FuncDeclaration::toObjFile(int): Assertion `ident != Id::empty' failed.
Reduced it as much as I had time to.