[Dlang-internal] Making DIP25 the default
Dicebot via Dlang-internal
dlang-internal at puremagic.com
Sun Oct 16 06:23:56 PDT 2016
It has been a very long time since -dip25 CLI switch was introduced.
More importantly, it is a requirement for coming DIP1000, which means
that turning it into normal behavior must be prioritized.
I have quickly checked current DMD sources and this seems to be the only
place affected by the switch:
```
// escape.d
/* Check for returning a ref variable by 'ref', but should be 'return ref'
* Infer the addition of 'return', or set result to be the offending
expression.
*/
if (global.params.useDIP25 &&
(v.storage_class & (STCref | STCout)) &&
!(v.storage_class & (STCreturn | STCforeach)))
{
```
Looks like it is relatively simple to enable that block unconditionally
and turn errors inside it into deprecations.
@Martin would be OK with adding this change to coming release? That way
we will have more time to fix any issues before DIP1000 comes into play.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/dlang-internal/attachments/20161016/c55110ad/attachment-0002.sig>
More information about the Dlang-internal
mailing list