https://issues.dlang.org/show_bug.cgi?id=24237
Issue ID: 24237
Summary: BetterC: equality of static arrays fails in betterC
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: betterC, rejects-valid
Severity: major
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
This program fails to compile:
struct Foo {
int x;
}
extern(C)
int main(){
Foo fa, fb;
int x = fa == fb;
Foo[2] a, b;
x += a == b; // Error: expression `a == b` uses the GC and cannot be used
with switch `-betterC`
return x;
}
This should just work, and the idea that `a == b` uses the GC is ridiculous.
--