www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10456] New: struct containing enum X, alias X this and a dynamic array no longer compiles since 2.063

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10456

           Summary: struct containing enum X, alias X this and a dynamic
                    array no longer compiles since 2.063
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: gassa mail.ru



I have reduced my problematic code to this:

-----
struct TheStruct
{
    enum TheEnum {ELEMENT};
    alias TheEnum this;
    int [] x;
}
-----

It produces the following errors:

-----
Error: type TheEnum is not an expression
Error: type TheEnum is not an expression
-----

Notes:
1. Compiles fine with DMD 2.062. Gives the errors with 2.063 and 2.063.2.
2. It does print the error twice.
3. No file or line number in the message complicates debugging.
4. "int [] x" cannot be further reduced to "int x". Seems it has to be a
dynamic array (of anything), associative array, a class or struct containing
such an array, or something similar to produce the error. If TheStruct is a
class instead of a struct, the error also vanishes in my case.

Ivan Kazmenko.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10456


Henning Pohl <henning still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |henning still-hidden.de



PDT ---
https://github.com/D-Programming-Language/dmd/pull/2255

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10456




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a84fd39628a577723852dd4993061eda5303c1e1
fix issue 10456 - struct containing enum X, alias X this and a dynamic
array no longer compiles since 2.063

https://github.com/D-Programming-Language/dmd/commit/ad0909d74e282f6589ff7adbd12ab14d91a5ef69


[REG2.063] fix issue 10456 - struct containing enum X, alias X this and a
dynamic array no longer compiles since 2.063

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 28 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10456




Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/97bdd75b81b8ee742be8f40e1a7761919a1a256e


[REG2.063] fix issue 10456 - struct containing enum X, alias X this and a
dynamic array no longer compiles since 2.063
Conflicts:
    test/runnable/aliasthis.d

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 28 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10456


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 28 2013