[Issue 22854] static foreach byCodepoint segfault (2.099-rc.1)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 7 16:37:32 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22854
--- Comment #2 from FeepingCreature <default_357-line at yahoo.de> ---
Further reduced:
void main() {
static foreach (ch; SomeContainer().range) { }
}
struct SomeContainer {
SomeRange range() { return SomeRange(); }
TypeWithDestructor data;
}
struct TypeWithDestructor { ~this() { } }
struct SomeRange {
int front() { return 0; }
bool empty() { return true; }
void popFront() { }
}
--
More information about the Digitalmars-d-bugs
mailing list