[dmd-internals] [D-Programming-Language/dmd] 012222: fix Issue 15500 - default construction disabled fo...
GitHub via dmd-internals
dmd-internals at puremagic.com
Tue Jan 5 14:15:56 PST 2016
Branch: refs/heads/stable
Home: https://github.com/D-Programming-Language/dmd
Commit: 0122225c1eb7b4c92a5060fefbc5cae498818d39
https://github.com/D-Programming-Language/dmd/commit/0122225c1eb7b4c92a5060fefbc5cae498818d39
Author: Martin Nowak <code at dawg.eu>
Date: 2016-01-05 (Tue, 05 Jan 2016)
Changed paths:
M src/func.d
M test/compilable/compile1.d
M test/fail_compilation/diag3438.d
A test/fail_compilation/diag3438b.d
Log Message:
-----------
fix Issue 15500 - default construction disabled for struct constructor with default arguments
- fix implementation of #5185, the new check should only
be a deprecation warning for now, but inadvertently
disabled default initialization (`S s;`) by setting
sd.noDefaultCtor
- simplify logic and control flow (only need to check whether
the first parameter has a default argument)
- still allow any kind of variadic constructor (doesn't make
sense to distinguish C from D-style variadics)
We might deprecate those called w/ zero arguments
(`auto s = S();`) on the call-site, but disallowing them
in general seems to drastic.
- Use a deprecation instead of a warning, since using
the -dw switch as default we agreed to no longer abuse
warnings for deprecations, so that people can cleanly compile
with -w. Edgy people insisting on using -de have to immediately
deal w/ deprecations.
Commit: e50f8aa63356b767c713b50c4d944e9b28345de7
https://github.com/D-Programming-Language/dmd/commit/e50f8aa63356b767c713b50c4d944e9b28345de7
Author: David Nadlinger <code at klickverbot.at>
Date: 2016-01-05 (Tue, 05 Jan 2016)
Changed paths:
M src/func.d
M test/compilable/compile1.d
M test/fail_compilation/diag3438.d
A test/fail_compilation/diag3438b.d
Log Message:
-----------
Merge pull request #5331 from MartinNowak/fix15500
fix Issue 15500 - default construction disabled for struct constructor with default arguments
Compare: https://github.com/D-Programming-Language/dmd/compare/d97905edd614...e50f8aa63356
More information about the dmd-internals
mailing list