Editions Ideas

Nick Treleaven nick at geany.org
Wed Dec 17 12:28:06 UTC 2025


On Tuesday, 16 December 2025 at 20:43:21 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
>
> On 17/12/2025 9:11 AM, Nick Treleaven wrote:
>> The parser can tell when it is specified in the file. The 
>> compiler should set the `Module.edition` field before the 
>> parser receives the `Module` instance when a matching 
>> `-edition` or `-E` flag is passed. AFAICT `-edition` seems to 
>> be supported but ignored currently in recent git dmd, and `-E` 
>> isn't implemented. I'll file a bug.
>
> It is implemented. Walter did it.
>
> https://github.com/dlang/dmd/blob/063ee15f6fa93c270f475bffd646b58e61e1294d/compiler/src/dmd/cli.d#L353
>
> https://github.com/dlang/dmd/blob/063ee15f6fa93c270f475bffd646b58e61e1294d/compiler/src/dmd/mars.d#L897
>
> As far as I'm aware editions is fully implemented.

No, `params.edition` is set but never read. Fix: 
https://github.com/dlang/dmd/pull/22248


More information about the Digitalmars-d mailing list