Re: What is the state of scope function parameter?

2017-03-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 29 March 2017 at 05:15:33 UTC, Ali Çehreli wrote: scope: references in the parameter cannot be escaped (e.g. assigned to a global variable). Ignored for parameters with no references However, it doesn't behave that way. For example, my example here currently

Re: What is the state of scope function parameter?

2017-03-29 Thread via Digitalmars-d-learn
On Wednesday, 29 March 2017 at 05:15:33 UTC, Ali Çehreli wrote: [..] How would you change the text there? scope: references in the parameter cannot be escaped (e.g. assigned to a global variable) in @safe code when compiled with -dip1000. Ignored for parameters with no

Re: What is the state of scope function parameter?

2017-03-29 Thread via Digitalmars-d-learn
On Wednesday, 29 March 2017 at 05:15:33 UTC, Ali Çehreli wrote: (More correctly, "scope storage class".) https://dlang.org/spec/function.html#Parameter still says scope: references in the parameter cannot be escaped (e.g. assigned to a global variable). Ignored for

Re: What is the state of scope function parameter?

2017-03-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 28, 2017 22:15:33 Ali Çehreli via Digitalmars-d-learn wrote: > (More correctly, "scope storage class".) > >https://dlang.org/spec/function.html#Parameter > > still says > >scope: references in the parameter cannot be escaped > (e.g. assigned to a global

What is the state of scope function parameter?

2017-03-28 Thread Ali Çehreli via Digitalmars-d-learn
(More correctly, "scope storage class".) https://dlang.org/spec/function.html#Parameter still says scope: references in the parameter cannot be escaped (e.g. assigned to a global variable). Ignored for parameters with no references However, it doesn't behave that way.