[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/7e057ad1a5dfb86b3cc2d3ba7167c44c053c0253
fix Issue 15191 - DIP25: Taking address of ref return is not type checked
soundly

https://github.com/dlang/dmd/commit/c9e42913421dcaf1b7202a91b237b598b3600d48
Merge pull request #5892 from WalterBright/fix15191

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/7e057ad1a5dfb86b3cc2d3ba7167c44c053c0253
fix Issue 15191 - DIP25: Taking address of ref return is not type checked
soundly

https://github.com/dlang/dmd/commit/c9e42913421dcaf1b7202a91b237b598b3600d48
Merge pull request #5892 from WalterBright/fix15191

fix Issue 15191 - DIP25: Taking address of ref return is not type cheā€¦

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

Walter Bright  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #3 from Walter Bright  ---
Not really an error with -dip25, as the diagnostic message should appear
regardless of -dip25 or not.

https://github.com/dlang/dmd/pull/5892

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

--- Comment #2 from Walter Bright  ---
The trouble here is the following:


int[N]* bar(return ref int[N] s) @safe
{
return (s);  // <== taking the address of a reference should be an
error
}

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

--- Comment #1 from Walter Bright  ---
Reformatting for readability:

enum N=100;

ref int[N] foo(return ref int[N] s)@safe
{
return s;
}

int[N]* bar(return ref int[N] s) @safe
{
return (s);
}

ref int[N] baz()@safe
{
int[N] s;
return *bar(s);
}

void bang(ref int[N] x) @safe
{
x[]=0x25BAD;
}

void main() @safe
{
bang(baz());
}

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

ZombineDev  changed:

   What|Removed |Added

 CC||petar.p.ki...@gmail.com

--


[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191

Walter Bright  changed:

   What|Removed |Added

   Keywords||safe
 CC||bugzi...@digitalmars.com

--