Mercurial > projects > ddmd
comparison dmd/TypeTypeof.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 | a8740d0dbea4 |
children | acd69f84627e |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
30 { | 30 { |
31 assert(false); | 31 assert(false); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 Type syntaxCopy() | 35 override Type syntaxCopy() |
36 { | 36 { |
37 //printf("TypeTypeof.syntaxCopy() %s\n", toChars()); | 37 //printf("TypeTypeof.syntaxCopy() %s\n", toChars()); |
38 TypeTypeof t; | 38 TypeTypeof t; |
39 | 39 |
40 t = new TypeTypeof(loc, exp.syntaxCopy()); | 40 t = new TypeTypeof(loc, exp.syntaxCopy()); |
41 t.syntaxCopyHelper(this); | 41 t.syntaxCopyHelper(this); |
42 t.mod = mod; | 42 t.mod = mod; |
43 return t; | 43 return t; |
44 } | 44 } |
45 | 45 |
46 Dsymbol toDsymbol(Scope sc) | 46 override Dsymbol toDsymbol(Scope sc) |
47 { | 47 { |
48 Type t = semantic(loc, sc); | 48 Type t = semantic(loc, sc); |
49 if (t is this) | 49 if (t is this) |
50 return null; | 50 return null; |
51 | 51 |
52 return t.toDsymbol(sc); | 52 return t.toDsymbol(sc); |
53 } | 53 } |
54 | 54 |
55 void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) | 55 override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) |
56 { | 56 { |
57 if (mod != this.mod) | 57 if (mod != this.mod) |
58 { | 58 { |
59 toCBuffer3(buf, hgs, mod); | 59 toCBuffer3(buf, hgs, mod); |
60 return; | 60 return; |
63 exp.toCBuffer(buf, hgs); | 63 exp.toCBuffer(buf, hgs); |
64 buf.writeByte(')'); | 64 buf.writeByte(')'); |
65 toCBuffer2Helper(buf, hgs); | 65 toCBuffer2Helper(buf, hgs); |
66 } | 66 } |
67 | 67 |
68 Type semantic(Loc loc, Scope sc) | 68 override Type semantic(Loc loc, Scope sc) |
69 { | 69 { |
70 Expression e; | 70 Expression e; |
71 Type t; | 71 Type t; |
72 | 72 |
73 //printf("TypeTypeof.semantic() %.*s\n", toChars()); | 73 //printf("TypeTypeof.semantic() %.*s\n", toChars()); |
172 | 172 |
173 Lerr: | 173 Lerr: |
174 return tvoid; | 174 return tvoid; |
175 } | 175 } |
176 | 176 |
177 ulong size(Loc loc) | 177 override ulong size(Loc loc) |
178 { | 178 { |
179 assert(false); | 179 assert(false); |
180 } | 180 } |
181 } | 181 } |