[Issue 9289] New: [Regression 2.061] Had been deprecated language features are enabled again in default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 9 21:32:30 PST 2013


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: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 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: -------


More information about the Digitalmars-d-bugs mailing list