comparison dmd/TypeNext.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 51605de93870
children acd69f84627e
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
29 { 29 {
30 assert(this.classinfo == TypeNext.classinfo); 30 assert(this.classinfo == TypeNext.classinfo);
31 return cloneTo(new TypeNext(ty, next)); 31 return cloneTo(new TypeNext(ty, next));
32 } 32 }
33 } 33 }
34 void toDecoBuffer(OutBuffer buf, int flag) 34 override void toDecoBuffer(OutBuffer buf, int flag)
35 { 35 {
36 super.toDecoBuffer(buf, flag); 36 super.toDecoBuffer(buf, flag);
37 assert(next !is this); 37 assert(next !is this);
38 //printf("this = %p, ty = %d, next = %p, ty = %d\n", this, this.ty, next, next.ty); 38 //printf("this = %p, ty = %d, next = %p, ty = %d\n", this, this.ty, next, next.ty);
39 next.toDecoBuffer(buf, (flag & 0x100) ? 0 : mod); 39 next.toDecoBuffer(buf, (flag & 0x100) ? 0 : mod);
40 } 40 }
41 41
42 void checkDeprecated(Loc loc, Scope sc) 42 override void checkDeprecated(Loc loc, Scope sc)
43 { 43 {
44 Type.checkDeprecated(loc, sc); 44 Type.checkDeprecated(loc, sc);
45 if (next) // next can be null if TypeFunction and auto return type 45 if (next) // next can be null if TypeFunction and auto return type
46 next.checkDeprecated(loc, sc); 46 next.checkDeprecated(loc, sc);
47 } 47 }
48 48
49 Type reliesOnTident() 49 override Type reliesOnTident()
50 { 50 {
51 return next.reliesOnTident(); 51 return next.reliesOnTident();
52 } 52 }
53 53
54 Type nextOf() 54 override Type nextOf()
55 { 55 {
56 return next; 56 return next;
57 } 57 }
58 58
59 Type makeConst() 59 override Type makeConst()
60 { 60 {
61 //printf("TypeNext::makeConst() %p, %s\n", this, toChars()); 61 //printf("TypeNext::makeConst() %p, %s\n", this, toChars());
62 if (cto) 62 if (cto)
63 { 63 {
64 assert(cto.mod == MOD.MODconst); 64 assert(cto.mod == MOD.MODconst);
77 } 77 }
78 //printf("TypeNext::makeConst() returns %p, %s\n", t, t.toChars()); 78 //printf("TypeNext::makeConst() returns %p, %s\n", t, t.toChars());
79 return t; 79 return t;
80 } 80 }
81 81
82 Type makeInvariant() 82 override Type makeInvariant()
83 { 83 {
84 //printf("TypeNext::makeInvariant() %s\n", toChars()); 84 //printf("TypeNext::makeInvariant() %s\n", toChars());
85 if (ito) 85 if (ito)
86 { 86 {
87 assert(ito.isInvariant()); 87 assert(ito.isInvariant());
93 t.next = next.invariantOf(); 93 t.next = next.invariantOf();
94 } 94 }
95 return t; 95 return t;
96 } 96 }
97 97
98 Type makeShared() 98 override Type makeShared()
99 { 99 {
100 //printf("TypeNext::makeShared() %s\n", toChars()); 100 //printf("TypeNext::makeShared() %s\n", toChars());
101 if (sto) 101 if (sto)
102 { 102 {
103 assert(sto.mod == MODshared); 103 assert(sto.mod == MODshared);
116 116
117 //printf("TypeNext::makeShared() returns %p, %s\n", t, t.toChars()); 117 //printf("TypeNext::makeShared() returns %p, %s\n", t, t.toChars());
118 return t; 118 return t;
119 } 119 }
120 120
121 Type makeSharedConst() 121 override Type makeSharedConst()
122 { 122 {
123 assert(false); 123 assert(false);
124 } 124 }
125 125
126 MATCH constConv(Type to) 126 override MATCH constConv(Type to)
127 { 127 {
128 MATCH m = Type.constConv(to); 128 MATCH m = Type.constConv(to);
129 129
130 if (m == MATCHconst && next.constConv((cast(TypeNext)to).next) == MATCHnomatch) 130 if (m == MATCHconst && next.constConv((cast(TypeNext)to).next) == MATCHnomatch)
131 m = MATCHnomatch; 131 m = MATCHnomatch;