Bug 289 – Compiler allows (and crashes on) dynamic arrays of typedefs of "immediate"-function types

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-08-15T19:13:00Z
Last change time
2014-02-15T13:22:03Z
Keywords
accepts-invalid, ice-on-invalid-code
Assigned to
bugzilla
Creator
bruno.do.medeiros+deebugz
Depends on
270

Comments

Comment #0 by bruno.do.medeiros+deebugz — 2006-08-15T19:13:22Z
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 }
Comment #1 by bugzilla — 2006-09-19T15:25:18Z
Fixed in DMC 0.167.
Comment #2 by thomas-dloop — 2006-10-06T02:10:37Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] 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-----