digitalmars.D.learn - Returning the address of a reference return value in safe code -
- Johan Engelen (22/22) Feb 20 2017 This code compiles with 2.071, but not with 2.072 nor 2.073:
- Jack Stouffer (3/4) Feb 20 2017 Yeah, this is another regression caused by DIP1000.
- Jack Stouffer (6/11) Feb 20 2017 For the record, the current list of regressions caused by DIP1000
- Dominikus Dittes Scherkl (4/19) Feb 21 2017 17117 and 17123 are already fixed on HEAD, no?
- Kagamin (3/5) Feb 22 2017 Maybe a bugfix in safety system? Should it go through deprecation
This code compiles with 2.071, but not with 2.072 nor 2.073: ``` struct S { int i; auto ref foo() safe { return i; } auto bar() safe { return &foo(); // <-- Error } } void main() { auto s = S(); s.bar(); } ``` The error is: "cannot take address of ref return of this.foo() in safe function bar". Is this a compiler regression, or is it a bug in the D code? https://issues.dlang.org/show_bug.cgi?id=17213 Thanks, Johan
Feb 20 2017
On Monday, 20 February 2017 at 20:49:43 UTC, Johan Engelen wrote:...Yeah, this is another regression caused by DIP1000. Christ.
Feb 20 2017
On Monday, 20 February 2017 at 20:54:31 UTC, Jack Stouffer wrote:On Monday, 20 February 2017 at 20:49:43 UTC, Johan Engelen wrote:For the record, the current list of regressions caused by DIP1000 https://issues.dlang.org/show_bug.cgi?id=17213 https://issues.dlang.org/show_bug.cgi?id=17188 https://issues.dlang.org/show_bug.cgi?id=17123 https://issues.dlang.org/show_bug.cgi?id=17117...Yeah, this is another regression caused by DIP1000. Christ.
Feb 20 2017
On Monday, 20 February 2017 at 21:05:17 UTC, Jack Stouffer wrote:On Monday, 20 February 2017 at 20:54:31 UTC, Jack Stouffer wrote:17117 and 17123 are already fixed on HEAD, no? So only two regressions remaining - I hope DIP1000 can be used to build new container libraries soon.On Monday, 20 February 2017 at 20:49:43 UTC, Johan Engelen wrote:For the record, the current list of regressions caused by DIP1000 https://issues.dlang.org/show_bug.cgi?id=17213 https://issues.dlang.org/show_bug.cgi?id=17188 https://issues.dlang.org/show_bug.cgi?id=17123 https://issues.dlang.org/show_bug.cgi?id=17117...Yeah, this is another regression caused by DIP1000. Christ.
Feb 21 2017
On Monday, 20 February 2017 at 20:49:43 UTC, Johan Engelen wrote:The error is: "cannot take address of ref return of this.foo() in safe function bar".Maybe a bugfix in safety system? Should it go through deprecation process?
Feb 22 2017