[Issue 18260] New: ICE on template this parameter and alias this
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 18 09:00:33 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18260
Issue ID: 18260
Summary: ICE on template this parameter and alias this
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Keywords: ice
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
The following code causes DMD to hang:
struct R {
int[] arr;
alias get this;
R get(this This)() {
return R.init;
}
}
unittest {
const(R) b = const(R).init;
}
As far as my testing shows, every line is necessary, and arr must be a dynamic
array. Changing get() to assert(false) instead of return, removes the bug.
--
More information about the Digitalmars-d-bugs
mailing list