August 23, 2019 [Issue 20156] New: Wrong error about local variable escape | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20156 Issue ID: 20156 Summary: Wrong error about local variable escape Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: dfj1esp02@sneakemail.com struct A { int[] b; } inout(int[]) f1(ref inout A); void f2(inout A src) { inout A c=src; inout(int[])[] a; a~=f1(c); } onlineapp.d(10): Error: copying f1(c) into allocated memory escapes a reference to local variable c -- |
Copyright © 1999-2021 by the D Language Foundation