What is the state of scope function parameter?
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Mar 28 22:15:33 PDT 2017
(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. For example, my example here
currently is a lie because there is no compilation error with 2.073.2:
http://ddili.org/ders/d.en/function_parameters.html#ix_function_parameters.scope
What's the truth? How would you change the text there?
Thank you,
Ali
More information about the Digitalmars-d-learn
mailing list