https://issues.dlang.org/show_bug.cgi?id=17470
Issue ID: 17470 Summary: [scope] this has longer lifetime then this Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: uplink.co...@googlemail.com The following code: @safe struct X { byte[] s; byte[9] a; this(int n) { assert(n < 9); s = a[0 .. n]; } } raises the error t.d(8): Error: address of variable this assigned to this with longer lifetime While infact, this has the exact same lifetime as this (it's the same pointer) --