[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 --- Comment #7 from Martin Nowak --- And this is supposed to not work? struct Handle { int a; } static @safe Handle get2(return ref scope S _this) { return Handle(1); } struct S { } Handle escape() @safe { S s; auto h =

[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 --- Comment #6 from Martin Nowak --- And the same is supposed to work for foreign pointers? static @safe float* get2(return ref scope S _this) { return convert(&_this); } @trusted float* convert(S* s) { return cast(float*)s; }

[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 --- Comment #5 from Martin Nowak --- (In reply to Martin Nowak from comment #4) > return ps1; // works silenty escapes !!! > // return ps2; // doesn't work correctly errors on escape !!! > } --

[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 --- Comment #4 from Martin Nowak --- There is a difference from member functions to free function. static @safe S* get2(return ref scope S _this) { return &_this; } struct S { @safe S* get1() return scope { return

[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 Martin Nowak changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17049] [scope] class references are not escape checked like pointers

2017-02-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 --- Comment #1 from Martin Nowak --- No longer works (not even for int*) with dmd-master-2017-01-04 and -dip1000. --

[Issue 17049] [scope] class references are not escape checked like pointers

2016-12-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 Martin Nowak changed: What|Removed |Added Keywords||safe --

[Issue 17049] [scope] class references are not escape checked like pointers

2016-12-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17049 Martin Nowak changed: What|Removed |Added Hardware|x86_64 |All OS|Linux