Mercurial > projects > ddmd
diff dmd/TypeTypedef.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 | f708f0452e81 |
children | ef02e2e203c2 |
line wrap: on
line diff
--- a/dmd/TypeTypedef.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/TypeTypedef.d Sat Aug 28 16:19:48 2010 +0200 @@ -40,46 +40,46 @@ } } - Type syntaxCopy() + override Type syntaxCopy() { assert(false); } - ulong size(Loc loc) + override ulong size(Loc loc) { return sym.basetype.size(loc); } - uint alignsize() + override uint alignsize() { assert(false); } - string toChars() + override string toChars() { assert(false); } - Type semantic(Loc loc, Scope sc) + override Type semantic(Loc loc, Scope sc) { //printf("TypeTypedef::semantic(%s), sem = %d\n", toChars(), sym->sem); sym.semantic(sc); return merge(); } - Dsymbol toDsymbol(Scope sc) + override Dsymbol toDsymbol(Scope sc) { return sym; } - void toDecoBuffer(OutBuffer buf, int flag) + override void toDecoBuffer(OutBuffer buf, int flag) { Type.toDecoBuffer(buf, flag); string name = sym.mangle(); buf.printf("%s", name); } - void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) + override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) { //printf("TypeTypedef.toCBuffer2() '%s'\n", sym.toChars()); if (mod != this.mod) @@ -91,7 +91,7 @@ buf.writestring(sym.toChars()); } - Expression dotExp(Scope sc, Expression e, Identifier ident) + override Expression dotExp(Scope sc, Expression e, Identifier ident) { version (LOGDOTEXP) { printf("TypeTypedef.dotExp(e = '%s', ident = '%s') '%s'\n", e.toChars(), ident.toChars(), toChars()); @@ -103,7 +103,7 @@ return sym.basetype.dotExp(sc, e, ident); } - Expression getProperty(Loc loc, Identifier ident) + override Expression getProperty(Loc loc, Identifier ident) { version (LOGDOTEXP) { printf("TypeTypedef.getProperty(ident = '%s') '%s'\n", ident.toChars(), toChars()); @@ -120,7 +120,7 @@ assert(false); } - bool isintegral() + override bool isintegral() { //printf("TypeTypedef::isintegral()\n"); //printf("sym = '%s'\n", sym->toChars()); @@ -128,47 +128,47 @@ return sym.basetype.isintegral(); } - bool isfloating() + override bool isfloating() { return sym.basetype.isfloating(); } - bool isreal() + override bool isreal() { return sym.basetype.isreal(); } - bool isimaginary() + override bool isimaginary() { return sym.basetype.isimaginary(); } - bool iscomplex() + override bool iscomplex() { return sym.basetype.iscomplex(); } - bool isscalar() + override bool isscalar() { return sym.basetype.isscalar(); } - bool isunsigned() + override bool isunsigned() { return sym.basetype.isunsigned(); } - bool checkBoolean() + override bool checkBoolean() { return sym.basetype.checkBoolean(); } - int isAssignable() + override int isAssignable() { return sym.basetype.isAssignable(); } - Type toBasetype() + override Type toBasetype() { if (sym.inuse) { @@ -183,7 +183,7 @@ return t; } - MATCH implicitConvTo(Type to) + override MATCH implicitConvTo(Type to) { MATCH m; @@ -201,7 +201,7 @@ return m; } - MATCH constConv(Type to) + override MATCH constConv(Type to) { if (equals(to)) return MATCHexact; @@ -210,7 +210,7 @@ return MATCHnomatch; } - Expression defaultInit(Loc loc) + override Expression defaultInit(Loc loc) { Expression e; Type bt; @@ -235,7 +235,7 @@ return e; } - bool isZeroInit(Loc loc) + override bool isZeroInit(Loc loc) { if (sym.init) { @@ -259,7 +259,7 @@ return result; } - dt_t** toDt(dt_t** pdt) + override dt_t** toDt(dt_t** pdt) { if (sym.init) { @@ -275,7 +275,7 @@ return pdt; } - MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) + override MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) { // Extra check if (tparam && tparam.ty == Ttypedef) @@ -288,17 +288,17 @@ return Type.deduceType(sc, tparam, parameters, dedtypes); } - TypeInfoDeclaration getTypeInfoDeclaration() + override TypeInfoDeclaration getTypeInfoDeclaration() { return new TypeInfoTypedefDeclaration(this); } - bool hasPointers() + override bool hasPointers() { return toBasetype().hasPointers(); } - Type toHeadMutable() + override Type toHeadMutable() { assert(false); } @@ -310,13 +310,13 @@ } } - type* toCtype() + override type* toCtype() { return sym.basetype.toCtype(); } - type* toCParamtype() + override type* toCParamtype() { return sym.basetype.toCParamtype(); } -} \ No newline at end of file +}