October 08, 2023 [Issue 11070] Allow declaration statement in a switch expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11070 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |b2.temp@gmx.com --- Comment #13 from Basile-z <b2.temp@gmx.com> --- It was not the case in the 2013 but 10 years later adding this feature is a failure to recognize the more general pattern: the VarDecl as used in this proposal could be a primary expression and should not be tied to specific statements. 1. First this was possible as IfStatement condition. 2. Then it was added as WhileStatement condition 3. Now it will be added as SwitchStatement condition 4. In the future someone will realize that - this is useful to deconstruct tuples - this is useful in AndEnExpression and OrOrExpression - this is useful in the CallExpression for the `out` parameters etc. etc. Making the new primary would fix that in one shot. -- |
October 09, 2023 [Issue 11070] Allow declaration statement in a switch expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11070 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #14 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #15656 "Fix issue 11070 - Allow declaration statement in a switch expression" was merged into master: - f123432a608274bd9d7f377abc86db10e66dc0dc by Mai-Lapyst: Fix issue 11070 - Allow declaration statement in a switch expression - d6ba4f7981961a8baa9c80cdd9ac681bfa7134f4 by Mai-Lapyst: Update tests for issue 11070 to match test suite requirements https://github.com/dlang/dmd/pull/15656 -- |
Copyright © 1999-2021 by the D Language Foundation