[Issue 19097] Extend Return Scope Semantics

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19097 --- Comment #9 from Mike Franklin --- (In reply to Steven Schveighoffer from comment #8) > Just because Phobos follows the convention of putting the "return" parameter > as the first parameter, does that mean the language should require it? I

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #9 from ag0aep6g --- (In reply to Atila Neves from comment #8) > > @safe code can mess with it > > No it can't, that's the point of @safe. Mess with it how? @safe applies to functions/methods, not variables/fields. You can't forbid

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #8 from Atila Neves --- > @safe code can mess with it No it can't, that's the point of @safe. Mess with it how? > Why shouldn't this compile? There's no `scope` anywhere now (except maybe an > inferred one) Function template =>

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #7 from ag0aep6g --- (In reply to Atila Neves from comment #6) > What's @trusted is that I'm calling `free` on the same pointer I allocated > in the constructor, and the other thing needing checking is the postblit. If you want to keep

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #6 from Atila Neves --- I typed the code from memory and made a mistake. Yes, it's supposed to be `.ptr`. There's no way I can call core.stdc.stdlib.free without @trusted _somewhere_, since `free` isn't @safe - free(42) is obviously

[Issue 19097] Extend Return Scope Semantics

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19097 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #8

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #5 from ag0aep6g --- (In reply to Atila Neves from comment #4) > I made a mistake when I posted the code. This compiles but shouldn't (the > only difference is removing `scope` from the destructor). [...] > @safe: > > const(int)*

[Issue 18609] `is` expression identifier accessible outside `static if`

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18609 ZombineDev changed: What|Removed |Added CC||petar.p.ki...@gmail.com --- Comment #1 from

[Issue 18609] `is` expression identifier accessible outside `static if`

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18609 Nick Treleaven changed: What|Removed |Added Keywords||accepts-invalid

[Issue 19097] Extend Return Scope Semantics

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19097 Atila Neves changed: What|Removed |Added CC||atila.ne...@gmail.com --- Comment #7 from

[Issue 19175] @safe code can escape local array references

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19175 --- Comment #4 from anonymous4 --- @safe: struct A(T) { int[] r; this(int[] q){r=q;} } int[] escape(T)(int[] r) { return A!int(r).r; } int[] f() { int[6] xs = [0, 1, 2, 3, 4, 5]; return xs.escape!int; } --

[Issue 19175] @safe code can escape local array references

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19175 --- Comment #3 from anonymous4 --- Reduced: @safe: struct A(alias fun) { int[] r; this(int[] q){r=q;} } template m(alias fun) { auto m(int[] r) { return A!fun(r); } } auto foo() { int[6] xs = [0, 1, 2, 3, 4, 5];

[Issue 18051] missing enum support in formattedRead/unformatValue

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18051 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/6a0a91a8135cc0ce10253c23e788b0782bce165e Use version(TestComplex) as a workaround against issue

[Issue 19162] [REG: 2.079.0] Public Import Overlapping Names Conflict Resolution

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19162 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/1798119abff6b7226ad65ce57339a26f0ab0bf4e Fix issue 19162

[Issue 19162] [REG: 2.079.0] Public Import Overlapping Names Conflict Resolution

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19162 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #4 from Atila Neves --- I made a mistake when I posted the code. This compiles but shouldn't (the only difference is removing `scope` from the destructor). I also surrounded the call to `free` with @trusted instead of the whole

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 ZombineDev changed: What|Removed |Added CC||petar.p.ki...@gmail.com --- Comment #3 from

[Issue 19183] DIP1000 defeated if auto used instead of scope in variable declaration with template this member function

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19183 --- Comment #2 from Atila Neves --- I used dmd 2.081.2. I just tried it again and it compiles. Just in case there's something wrong with the Arch Linux package, I used dmd.081.2 from install.sh. Same result. I also tried the 2.082.0 beta 1. Same

[Issue 19175] @safe code can escape local array references

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19175 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --

[Issue 18545] Casting away const with cast() triggers alias this, but returns the supertype anyway

2018-08-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18545 --- Comment #1 from FeepingCreature --- It turns out what's happening here is that cast() constNullable is equivalent to Nullable(constNullable)... which implicitly casts to constNullable.get. alias get this strikes again! Nullable should maybe