Mercurial > projects > ddmd
diff dmd/ReturnStatement.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 | ee3a9f34dc48 |
children | ef02e2e203c2 |
line wrap: on
line diff
--- a/dmd/ReturnStatement.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/ReturnStatement.d Sat Aug 28 16:19:48 2010 +0200 @@ -57,18 +57,18 @@ this.exp = exp; } - Statement syntaxCopy() + override Statement syntaxCopy() { Expression e = exp ? exp.syntaxCopy() : null; return new ReturnStatement(loc, e); } - void toCBuffer(OutBuffer buf, HdrGenState* hgs) + override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { assert(false); } - Statement semantic(Scope sc) + override Statement semantic(Scope sc) { //printf("ReturnStatement.semantic() %s\n", toChars()); @@ -346,7 +346,7 @@ return this; } - BE blockExit() + override BE blockExit() { BE result = BE.BEreturn; if (exp && exp.canThrow()) @@ -355,7 +355,7 @@ return result; } - Expression interpret(InterState istate) + override Expression interpret(InterState istate) { version (LOG) { printf("ReturnStatement.interpret(%s)\n", exp ? exp.toChars() : ""); @@ -372,7 +372,7 @@ } } - int inlineCost(InlineCostState* ics) + override int inlineCost(InlineCostState* ics) { // Can't handle return statements nested in if's if (ics.nested) @@ -380,13 +380,13 @@ return exp ? exp.inlineCost(ics) : 0; } - Expression doInline(InlineDoState ids) + override Expression doInline(InlineDoState ids) { //printf("ReturnStatement.doInline() '%s'\n", exp ? exp.toChars() : ""); return exp ? exp.doInline(ids) : null; } - Statement inlineScan(InlineScanState* iss) + override Statement inlineScan(InlineScanState* iss) { //printf("ReturnStatement.inlineScan()\n"); if (exp) @@ -396,7 +396,7 @@ return this; } - void toIR(IRState* irs) + override void toIR(IRState* irs) { Blockx* blx = irs.blx; @@ -513,5 +513,5 @@ block_next(blx, BC.BCret, null); } - ReturnStatement isReturnStatement() { return this; } -} \ No newline at end of file + override ReturnStatement isReturnStatement() { return this; } +}