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


--- Comment #0 from Ivan Kazmenko <gassa mail.ru> 2013-06-23 17:09:20 PDT ---
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


--- Comment #1 from Henning Pohl <henning still-hidden.de> 2013-06-24 06:03:37
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



--- Comment #2 from github-bugzilla puremagic.com 2013-06-28 06:00:18 PDT ---
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
Merge pull request #2255 from hpohl/10456

[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



--- Comment #3 from github-bugzilla puremagic.com 2013-06-28 06:08:50 PDT ---
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/97bdd75b81b8ee742be8f40e1a7761919a1a256e
Merge pull request #2255 from hpohl/10456

[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