www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 289] New: Compiler allows (and crashes on) dynamic arrays of typedefs of "immediate"-function types

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

           Summary: Compiler allows (and crashes on) dynamic arrays of
                    typedefs of "immediate"-function types
           Product: D
           Version: 0.164
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid, ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: brunodomedeiros+bugz gmail.com
 BugsThisDependsOn: 270


Compiler allows the declaration of dynamic arrays of typedefs of
"immediate"-function types. And crashes when trying to change the length of
those. Code:
-----

typedef int ft(int);

ft[] x;  // is allowed 

void test() {
    x.length = 2;  // crashes DMD
}


-- 
Aug 15 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=289


bugzilla digitalmars.com changed:

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





Fixed in DMC 0.167.


-- 
Sep 19 2006
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-08-16:
 http://d.puremagic.com/issues/show_bug.cgi?id=289
 Compiler allows the declaration of dynamic arrays of typedefs of
 "immediate"-function types. And crashes when trying to change the length of
 those. Code:
 -----

 typedef int ft(int);

 ft[] x;  // is allowed 

 void test() {
     x.length = 2;  // crashes DMD
 }
Added to DStress as http://dstress.kuehne.cn/nocompile/t/typedef_21_A.d http://dstress.kuehne.cn/nocompile/t/typedef_21_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFJgmvLK5blCcjpWoRAk1KAJsFyeU3CHMRE3pOakmSQNsVh9/WcwCgmj6m EgDc34DbE+dVHMs56bJvFaw= =SpGK -----END PGP SIGNATURE-----
Oct 06 2006