[Issue 5929] New: Casting to void, Internal error: ..\ztc\cod1.c 3136

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 5 08:57:19 PDT 2011


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

           Summary: Casting to void, Internal error: ..\ztc\cod1.c 3136
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: pszturmaj at tlen.pl


--- Comment #0 from Piotr Szturmaj <pszturmaj at tlen.pl> 2011-05-05 08:53:25 PDT ---
module main;

void test(void[] a)
{
}

void main(string[] argv)
{
    long num;

    test(cast(void[])[num]); // ok
    test([cast(void)num]); // Internal error: ..\ztc\cod1.c 3136
}

I think the last construct should be disallowed by the compiler.

-- 
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