[Issue 18644] New: [dip1000] escape of outer local not detected
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 21 07:30:21 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18644
Issue ID: 18644
Summary: [dip1000] escape of outer local not detected
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
Consider:
@safe void test() {
int i;
int*[] a = [&i]; // error detected correctly
int* foo() { return &i; }
int*[] b = [foo()]; // should detect error
}
--
More information about the Digitalmars-d-bugs
mailing list