Mercurial > projects > ddmd
changeset 181:aa70dca07cb0
ArrayExp.toCBuffer and TypeReturn.toCBuffer2
author | korDen |
---|---|
date | Mon, 18 Oct 2010 00:36:44 +0400 |
parents | 0622fff7810a |
children | b64060ab22df 190ba98276b3 |
files | dmd/ArrayExp.d dmd/TypeReturn.d |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/ArrayExp.d Sun Oct 17 23:23:28 2010 +0400 +++ b/dmd/ArrayExp.d Mon Oct 18 00:36:44 2010 +0400 @@ -12,6 +12,7 @@ import dmd.HdrGenState; import dmd.InlineScanState; import dmd.ArrayTypes; +import dmd.PREC; import dmd.TOK; import dmd.Type; import dmd.TY; @@ -90,7 +91,10 @@ override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { - assert(false); + expToCBuffer(buf, hgs, e1, PREC_primary); + buf.writeByte('['); + argsToCBuffer(buf, arguments, hgs); + buf.writeByte(']'); } override void scanForNestedRef(Scope sc)
--- a/dmd/TypeReturn.d Sun Oct 17 23:23:28 2010 +0400 +++ b/dmd/TypeReturn.d Mon Oct 18 00:36:44 2010 +0400 @@ -87,6 +87,12 @@ override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) { - assert(false); + if (mod != this.mod) + { + toCBuffer3(buf, hgs, mod); + return; + } + buf.writestring("typeof(return)"); + toCBuffer2Helper(buf, hgs); } }