comparison 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
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
35 super(loc, TOK.TOKdelegate, DelegateExp.sizeof, e); 35 super(loc, TOK.TOKdelegate, DelegateExp.sizeof, e);
36 this.func = f; 36 this.func = f;
37 this.hasOverloads = hasOverloads; 37 this.hasOverloads = hasOverloads;
38 } 38 }
39 39
40 Expression semantic(Scope sc) 40 override Expression semantic(Scope sc)
41 { 41 {
42 version (LOGSEMANTIC) { 42 version (LOGSEMANTIC) {
43 printf("DelegateExp.semantic('%s')\n", toChars()); 43 printf("DelegateExp.semantic('%s')\n", toChars());
44 } 44 }
45 if (!type) 45 if (!type)
52 e1 = getRightThis(loc, sc, ad, e1, func); 52 e1 = getRightThis(loc, sc, ad, e1, func);
53 } 53 }
54 return this; 54 return this;
55 } 55 }
56 56
57 MATCH implicitConvTo(Type t) 57 override MATCH implicitConvTo(Type t)
58 { 58 {
59 static if (false) { 59 static if (false) {
60 printf("DelegateExp.implicitConvTo(this=%s, type=%s, t=%s)\n", 60 printf("DelegateExp.implicitConvTo(this=%s, type=%s, t=%s)\n",
61 toChars(), type.toChars(), t.toChars()); 61 toChars(), type.toChars(), t.toChars());
62 } 62 }
78 } 78 }
79 } 79 }
80 return result; 80 return result;
81 } 81 }
82 82
83 Expression castTo(Scope sc, Type t) 83 override Expression castTo(Scope sc, Type t)
84 { 84 {
85 static if (false) { 85 static if (false) {
86 printf("DelegateExp.castTo(this=%s, type=%s, t=%s)\n", 86 printf("DelegateExp.castTo(this=%s, type=%s, t=%s)\n",
87 toChars(), type.toChars(), t.toChars()); 87 toChars(), type.toChars(), t.toChars());
88 } 88 }
129 e.type = t; 129 e.type = t;
130 } 130 }
131 return e; 131 return e;
132 } 132 }
133 133
134 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 134 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
135 { 135 {
136 buf.writeByte('&'); 136 buf.writeByte('&');
137 if (!func.isNested()) 137 if (!func.isNested())
138 { 138 {
139 expToCBuffer(buf, hgs, e1, PREC.PREC_primary); 139 expToCBuffer(buf, hgs, e1, PREC.PREC_primary);
140 buf.writeByte('.'); 140 buf.writeByte('.');
141 } 141 }
142 buf.writestring(func.toChars()); 142 buf.writestring(func.toChars());
143 } 143 }
144 144
145 void dump(int indent) 145 override void dump(int indent)
146 { 146 {
147 assert(false); 147 assert(false);
148 } 148 }
149 149
150 int inlineCost(InlineCostState* ics) 150 override int inlineCost(InlineCostState* ics)
151 { 151 {
152 assert(false); 152 assert(false);
153 } 153 }
154 154
155 elem* toElem(IRState* irs) 155 override elem* toElem(IRState* irs)
156 { 156 {
157 elem* e; 157 elem* e;
158 elem* ethis; 158 elem* ethis;
159 elem* ep; 159 elem* ep;
160 Symbol* sfunc; 160 Symbol* sfunc;