Mercurial > projects > ddmd
diff dmd/LineInitExp.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 | 460959608115 |
children | e28b18c23469 |
line wrap: on
line diff
--- a/dmd/LineInitExp.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/LineInitExp.d Sat Aug 28 16:19:48 2010 +0200 @@ -1,30 +1,30 @@ -module dmd.LineInitExp; - -import dmd.Expression; -import dmd.Loc; -import dmd.Scope; -import dmd.DefaultInitExp; -import dmd.IntegerExp; -import dmd.TOK; -import dmd.Type; - -class LineInitExp : DefaultInitExp -{ - this(Loc loc) - { - super(loc, TOK.TOKline, this.sizeof); - } - - Expression semantic(Scope sc) - { - type = Type.tint32; - return this; - } - - Expression resolve(Loc loc, Scope sc) - { - Expression e = new IntegerExp(loc, loc.linnum, Type.tint32); - e = e.castTo(sc, type); - return e; - } -} +module dmd.LineInitExp; + +import dmd.Expression; +import dmd.Loc; +import dmd.Scope; +import dmd.DefaultInitExp; +import dmd.IntegerExp; +import dmd.TOK; +import dmd.Type; + +class LineInitExp : DefaultInitExp +{ + this(Loc loc) + { + super(loc, TOK.TOKline, this.sizeof); + } + + override Expression semantic(Scope sc) + { + type = Type.tint32; + return this; + } + + override Expression resolve(Loc loc, Scope sc) + { + Expression e = new IntegerExp(loc, loc.linnum, Type.tint32); + e = e.castTo(sc, type); + return e; + } +}