This segfaults in LDC 1.42.0:
void main() { Struct().get; }
struct Struct {
int field;
int get() {
int get2() {
// cast(void) this;
return __traits(getMember, this, "field");
}
return get2;
}
}
See: https://godbolt.org/z/1joxsYPWq
If this is explicitly accessed, it works.
edit: Reported to also happen in LDC 1.41!
edit: And on master, alright.
This segfaults in LDC 1.42.0:
See: https://godbolt.org/z/1joxsYPWq
If
thisis explicitly accessed, it works.edit: Reported to also happen in LDC 1.41!
edit: And on master, alright.