www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10646] New: [ICE] when casting dynamic array/static array to class reference

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

           Summary: [ICE] when casting dynamic array/static array to class
                    reference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: henning still-hidden.de



PDT ---
void main() {
    class C { }

    C[] csd;
    C[2] css;
    auto c1 = cast(C)csd;
    auto c2 = cast(C)css;
}

---
test.d(6): Error: e2ir: cannot cast csd of type C[] to type test.main.C
test.d(7): Error: e2ir: cannot cast css of type C[2LU] to type test.main.C
---

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull



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

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice                         |
            Summary|[ICE] when casting dynamic  |No front-end error for
                   |array/static array to class |invalid casting dynamic
                   |reference                   |array/static array to class
                   |                            |reference




 void main() {
     class C { }
 
     C[] csd;
     C[2] css;
     auto c1 = cast(C)csd;
     auto c2 = cast(C)css;
 }
 
 ---
 test.d(6): Error: e2ir: cannot cast csd of type C[] to type test.main.C
 test.d(7): Error: e2ir: cannot cast css of type C[2LU] to type test.main.C
 ---
I think there's no "Internal Compiler Error". These are proper errors but just come from glue layer. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10646




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

https://github.com/D-Programming-Language/dmd/commit/450f6cb9c3bfc7697c529a7750e8e2818e8a8a3e
fix issue 10646 - [ICE] when casting dynamic array/static array to class
reference

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


fix issue 10646 - [ICE] when casting dynamic array/static array to class
reference

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


Henning Pohl <henning still-hidden.de> 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: -------
Jul 16 2013