← Back to index
|
Original Bugzilla link
Bug 227 – Internal Compiler error: array concatenation/append on struct
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2006-06-26T23:09:00Z
Last change time
2014-02-15T13:19:06Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
godaves
Comments
Comment #0
by godaves — 2006-06-26T23:09:22Z
icee wrote: > struct SPoint{ > double x,y; > SPoint create(double x,double y){ > SPoint p; > p.x=x; > p.y=y; > return p; > } > } > .. > SPoint[] sps; > sps~=SPoint.create(2,4);//OK. > > sps=sps~SPoint.create(2,4);//Internal error: ..\ztc\type.c 308, dmd v0.161 > > int[] a; > a~=2;//OK. > a=a~2;//OK. > Just to help narrow the problem down, this works: import std.stdio; struct SPoint { double x,y; static SPoint create(double x,double y) { SPoint p; p.x = x; p.y = y; return p; } } void main() { SPoint[] sps; sps ~= SPoint.create(1,2); //sps = sps ~ SPoint.create(2,4); //Internal error: ..\ztc\type.c 308 SPoint sp = SPoint.create(2,4); //This works sps = sps ~ sp; int[] a; a ~= 2; a = a ~ 2; foreach(p; sps) writefln(p.x,",",p.y); }
Comment #1
by iceelyne — 2006-09-26T01:36:54Z
this seems not representable on dmd 0.167, but the official changelog does not mention it, should this be marked as RESOLVED?
Comment #2
by bugzilla — 2007-10-02T14:52:01Z
Not reproducible with DMD 1.021 and 2.004.