Mercurial > projects > ddmd
comparison dmd/Cast.d @ 79:43073c7c7769
updated to 2.035
also implemented a few missing functions
still crashes in Import.importAll though
author | Trass3r |
---|---|
date | Mon, 30 Aug 2010 03:57:51 +0200 |
parents | cab4c37afb89 |
children | be2ab491772e |
comparison
equal
deleted
inserted
replaced
78:b98fa8a4bf04 | 79:43073c7c7769 |
---|---|
117 { | 117 { |
118 // Struct = 0; | 118 // Struct = 0; |
119 StructDeclaration sd = tb.toDsymbol(null).isStructDeclaration(); | 119 StructDeclaration sd = tb.toDsymbol(null).isStructDeclaration(); |
120 assert(sd); | 120 assert(sd); |
121 Expressions elements = new Expressions; | 121 Expressions elements = new Expressions; |
122 for (size_t i = 0; i < sd.fields.dim; i++) | 122 foreach (Dsymbol s; sd.fields) |
123 { Dsymbol s = cast(Dsymbol)sd.fields.data[i]; | 123 { |
124 VarDeclaration v = s.isVarDeclaration(); | 124 VarDeclaration v = s.isVarDeclaration(); |
125 assert(v); | 125 assert(v); |
126 | 126 |
127 Expression exp = new IntegerExp(0); | 127 Expression exp = new IntegerExp(0); |
128 exp = Cast(v.type, v.type, exp); | 128 exp = Cast(v.type, v.type, exp); |