[Issue 10646] No front-end error for invalid casting dynamic array/static array to class reference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 15 18:54:54 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10646


Kenji Hara <k.hara.pg at 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


--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2013-07-15 18:54:52 PDT ---
(In reply to comment #0)
> 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: -------


More information about the Digitalmars-d-bugs mailing list