digitalmars.D.bugs - [Issue 17725] New: [scope] escape from nested function to enclosing
- via Digitalmars-d-bugs (29/30) Aug 06 2017 https://issues.dlang.org/show_bug.cgi?id=17725
https://issues.dlang.org/show_bug.cgi?id=17725 Issue ID: 17725 Summary: [scope] escape from nested function to enclosing local Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: bugzilla digitalmars.comFrom Rainer:void test() safe { int* p; struct T { int a; } void escape(ref T t) safe { p = &t.a; // should not compile } { T t; escape(t); } auto bug = *p; } Compile with -dip1000 --
Aug 06 2017