http://d.puremagic.com/issues/show_bug.cgi?id=9289
Summary: [Regression 2.061] Had been deprecated language
features are enabled again in default
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 2013-01-09 21:32:29 PST ---
This regression is introduced by the "Make deprecations as warnings the
default.
>From my comment:
https://github.com/D-Programming-Language/dmd/pull/1287#issuecomment-12080557
---
I found a big breaking introduced by this, in 2.061.
In current, all deprecated language features until 2.060 are accepted in
default. For example:
void main() {
typedef int X = 10; // !!
X x;
assert(x == 10);
}
typedef was deprecated from 2.058, then we couldn't compile the code in
default.
But, from 2.061, we can compile the code and run in default again.
More than worse, all deprecations which reported in semantic phase or later
will break code meaning silently.
import std.stdio;
void main() {
int[] arr;
static if (is(typeof({ auto ptr = *arr; })))
writeln("*arr is not deprecated");
else
writeln("*arr is deprecated, instead use arr.ptr");
}
The meaning of is(typeof({ auto ptr = *arr; })) is changed in default.
Therefore this is a huge breaking against the language improvement process in
the past few years.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------