Mercurial > projects > ddmd
diff dmd/DelegateExp.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 | 10317f0c89a5 |
children | ef02e2e203c2 |
line wrap: on
line diff
--- a/dmd/DelegateExp.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/DelegateExp.d Sat Aug 28 16:19:48 2010 +0200 @@ -1,21 +1,21 @@ -module dmd.DelegateExp; - -import dmd.Expression; +module dmd.DelegateExp; + +import dmd.Expression; import dmd.backend.elem; -import dmd.AggregateDeclaration; +import dmd.AggregateDeclaration; import dmd.UnaExp; -import dmd.TypeDelegate; -import dmd.FuncDeclaration; -import dmd.MATCH; -import dmd.Type; -import dmd.OutBuffer; +import dmd.TypeDelegate; +import dmd.FuncDeclaration; +import dmd.MATCH; +import dmd.Type; +import dmd.OutBuffer; import dmd.Loc; -import dmd.TY; -import dmd.Scope; -import dmd.InlineCostState; +import dmd.TY; +import dmd.Scope; +import dmd.InlineCostState; import dmd.IRState; -import dmd.PREC; -import dmd.HdrGenState; +import dmd.PREC; +import dmd.HdrGenState; import dmd.TOK; import dmd.expression.Util; @@ -23,21 +23,21 @@ import dmd.backend.Util; import dmd.backend.Symbol; import dmd.backend.TYM; -import dmd.backend.OPER; - +import dmd.backend.OPER; + class DelegateExp : UnaExp { FuncDeclaration func; int hasOverloads; this(Loc loc, Expression e, FuncDeclaration f, int hasOverloads = 0) - { + { super(loc, TOK.TOKdelegate, DelegateExp.sizeof, e); this.func = f; this.hasOverloads = hasOverloads; } - Expression semantic(Scope sc) + override Expression semantic(Scope sc) { version (LOGSEMANTIC) { printf("DelegateExp.semantic('%s')\n", toChars()); @@ -54,7 +54,7 @@ return this; } - MATCH implicitConvTo(Type t) + override MATCH implicitConvTo(Type t) { static if (false) { printf("DelegateExp.implicitConvTo(this=%s, type=%s, t=%s)\n", @@ -80,7 +80,7 @@ return result; } - Expression castTo(Scope sc, Type t) + override Expression castTo(Scope sc, Type t) { static if (false) { printf("DelegateExp.castTo(this=%s, type=%s, t=%s)\n", @@ -131,7 +131,7 @@ return e; } - void toCBuffer(OutBuffer buf, HdrGenState* hgs) + override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { buf.writeByte('&'); if (!func.isNested()) @@ -142,17 +142,17 @@ buf.writestring(func.toChars()); } - void dump(int indent) + override void dump(int indent) { assert(false); } - int inlineCost(InlineCostState* ics) + override int inlineCost(InlineCostState* ics) { assert(false); } - elem* toElem(IRState* irs) + override elem* toElem(IRState* irs) { elem* e; elem* ethis; @@ -215,4 +215,4 @@ return e; } -} \ No newline at end of file +}