Mercurial > projects > ddmd
view dmd/TypeExp.d @ 92:0c891ec48515
Fixed another bug related to copy ctor
author | korDen |
---|---|
date | Mon, 30 Aug 2010 23:43:38 +0400 |
parents | 2e2a5c3f943a |
children | a1cf34da9ebe |
line wrap: on
line source
module dmd.TypeExp; import dmd.Expression; import dmd.backend.elem; import dmd.Type; import dmd.OutBuffer; import dmd.Loc; import dmd.Scope; import dmd.IRState; import dmd.HdrGenState; import dmd.TOK; class TypeExp : Expression { this(Loc loc, Type type) { super(loc, TOK.TOKtype, TypeExp.sizeof); //printf("TypeExp::TypeExp(%s)\n", type->toChars()); this.type = type; } version (DumbClone) { } else { Type clone() { assert(false); } } override Expression syntaxCopy() { //printf("TypeExp.syntaxCopy()\n"); return new TypeExp(loc, type.syntaxCopy()); } override Expression semantic(Scope sc) { //printf("TypeExp::semantic(%s)\n", type->toChars()); type = type.semantic(loc, sc); return this; } override void rvalue() { assert(false); } override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { type.toCBuffer(buf, null, hgs); } override Expression optimize(int result) { return this; } override elem* toElem(IRState* irs) { assert(false); } }