Comment #0 by snarwin+bugzilla — 2020-08-15T16:16:15Z
The following program fails to compile with dmd 2.093.0:
---
struct S
{
void function(scope int) fp;
}
S s = {
fp: (scope int x) {}
};
---
The compiler's output:
$ dmd -c bug.d
bug.d(8): Error: found `}` when expecting `;` following statement
bug.d(8): Deprecation: use `{ }` for an empty statement, not `;`
bug.d(9): Error: found `End of File` when expecting `}` following compound statement
bug.d(9): Error: semicolon expected, not `End of File`
Comment #1 by b2.temp — 2020-08-15T19:32:37Z
this is a regression that starts from 2.080 actually. Unfortunately digger points to merge commits either using stable or master to bisect.
Comment #2 by b2.temp — 2020-08-15T20:27:19Z
Mmmh actually differ bistect ini file wrongly state that "master" is the default branch that's tried... with explicti "master" the culprit is found
https://github.com/dlang/dmd/pull/8051
Comment #3 by dlang-bot — 2020-08-15T21:05:20Z
@NilsLankila created dlang/dmd pull request #11578 "fix issue 21163 - scope lambda argument in struct init does not parse" fixing this issue:
- fix issue 21163 - scope lambda argument in struct init does not parse
https://github.com/dlang/dmd/pull/11578
Comment #4 by dlang-bot — 2020-08-17T12:16:33Z
dlang/dmd pull request #11578 "fix issue 21163 - scope lambda argument in struct init does not parse" was merged into stable:
- 624f881c14686c3ff450ecda7fca56656b19f806 by Nils Lankila:
fix issue 21163 - scope lambda argument in struct init does not parse
https://github.com/dlang/dmd/pull/11578