Mercurial > projects > ddmd
diff dmd/InExp.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 | 2e2a5c3f943a |
children | e28b18c23469 |
line wrap: on
line diff
--- a/dmd/InExp.d Sun Aug 29 14:39:08 2010 +0100 +++ b/dmd/InExp.d Mon Aug 30 03:57:51 2010 +0200 @@ -97,6 +97,14 @@ key.Enumbytes = key.E1.Enumbytes; assert(key.Enumbytes); } + else if (tybasic(key.Ety) == TYarray && taa.index.ty == Tsarray) + { + // e2.elem() turns string literals into a TYarray, so the + // length is lost. Restore it. + key = el_una(OPstrpar, TYstruct, key); + assert(e1.type.size() == taa.index.size()); + key.Enumbytes = cast(size_t) taa.index.size(); + } Symbol* s = taa.aaGetSymbol("In", 0); keyti = taa.index.getInternalTypeInfo(null).toElem(irs);