https://issues.dlang.org/show_bug.cgi?id=21608
Issue ID: 21608 Summary: [betterC] static slices are allowed and have the wrong size Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: lucien.perreg...@gmail.com Pretty much the title. Slices uses TypeInfo, which should be disallowed in betterC mode. --- import core.stdc.stdio; extern(C) void main() { static int[] a = [ 1, 2, 3, 4, 5, 6 ]; // Shouldn't be allowed printf("%lli", a.sizeof); // prints 16 instead of 24 } --- --