Mercurial > projects > ddmd
diff dmd/ThisExp.d @ 72:2e2a5c3f943a
reduced warnings by adding override to the methods
think this also normalizes different line endings used all over the place
author | Trass3r |
---|---|
date | Sat, 28 Aug 2010 16:19:48 +0200 |
parents | cab4c37afb89 |
children | e28b18c23469 |
line wrap: on
line diff
--- a/dmd/ThisExp.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/ThisExp.d Sat Aug 28 16:19:48 2010 +0200 @@ -1,22 +1,22 @@ -module dmd.ThisExp; - -import dmd.Expression; +module dmd.ThisExp; + +import dmd.Expression; import dmd.Declaration; import dmd.StructDeclaration; import dmd.ClassDeclaration; import dmd.Dsymbol; -import dmd.FuncDeclaration; +import dmd.FuncDeclaration; import dmd.backend.elem; -import dmd.CSX; -import dmd.InterState; -import dmd.OutBuffer; -import dmd.Loc; +import dmd.CSX; +import dmd.InterState; +import dmd.OutBuffer; +import dmd.Loc; import dmd.Scope; -import dmd.Type; -import dmd.TOK; -import dmd.InlineCostState; -import dmd.InlineDoState; -import dmd.IRState; +import dmd.Type; +import dmd.TOK; +import dmd.InlineCostState; +import dmd.InlineDoState; +import dmd.IRState; import dmd.HdrGenState; import dmd.VarExp; import dmd.TY; @@ -25,7 +25,7 @@ import dmd.backend.TYM; import dmd.backend.Util; import dmd.backend.OPER; - + class ThisExp : Expression { Declaration var; @@ -36,7 +36,7 @@ //printf("ThisExp::ThisExp() loc = %d\n", loc.linnum); } - Expression semantic(Scope sc) + override Expression semantic(Scope sc) { FuncDeclaration fd; FuncDeclaration fdthis; @@ -102,38 +102,38 @@ return this; } - Expression interpret(InterState istate) + override Expression interpret(InterState istate) { assert(false); } - bool isBool(bool result) + override bool isBool(bool result) { return result ? true : false; } - void toCBuffer(OutBuffer buf, HdrGenState* hgs) + override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { buf.writestring("this"); } version (DMDV2) { - int isLvalue() + override int isLvalue() { return 1; } } - Expression toLvalue(Scope sc, Expression e) + override Expression toLvalue(Scope sc, Expression e) { return this; } - void scanForNestedRef(Scope sc) + override void scanForNestedRef(Scope sc) { assert(false); } - int inlineCost(InlineCostState* ics) + override int inlineCost(InlineCostState* ics) { FuncDeclaration fd = ics.fd; if (!ics.hdrscan) @@ -143,7 +143,7 @@ return 1; } - Expression doInline(InlineDoState ids) + override Expression doInline(InlineDoState ids) { //if (!ids.vthis) //error("no 'this' when inlining %s", ids.parent.toChars()); @@ -157,7 +157,7 @@ return ve; } - elem* toElem(IRState* irs) + override elem* toElem(IRState* irs) { elem* ethis; FuncDeclaration fd;