Mercurial > projects > ddmd
comparison dmd/ExpInitializer.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 |
---|---|
24 { | 24 { |
25 super(loc); | 25 super(loc); |
26 this.exp = exp; | 26 this.exp = exp; |
27 } | 27 } |
28 | 28 |
29 Initializer syntaxCopy() | 29 override Initializer syntaxCopy() |
30 { | 30 { |
31 return new ExpInitializer(loc, exp.syntaxCopy()); | 31 return new ExpInitializer(loc, exp.syntaxCopy()); |
32 } | 32 } |
33 | 33 |
34 Initializer semantic(Scope sc, Type t) | 34 override Initializer semantic(Scope sc, Type t) |
35 { | 35 { |
36 //printf("ExpInitializer.semantic(%s), type = %s\n", exp.toChars(), t.toChars()); | 36 //printf("ExpInitializer.semantic(%s), type = %s\n", exp.toChars(), t.toChars()); |
37 exp = exp.semantic(sc); | 37 exp = exp.semantic(sc); |
38 exp = resolveProperties(sc, exp); | 38 exp = resolveProperties(sc, exp); |
39 exp = exp.optimize(WANT.WANTvalue | WANT.WANTinterpret); | 39 exp = exp.optimize(WANT.WANTvalue | WANT.WANTinterpret); |
68 exp = exp.optimize(WANT.WANTvalue | WANT.WANTinterpret); | 68 exp = exp.optimize(WANT.WANTvalue | WANT.WANTinterpret); |
69 //printf("-ExpInitializer.semantic(): "); exp.print(); | 69 //printf("-ExpInitializer.semantic(): "); exp.print(); |
70 return this; | 70 return this; |
71 } | 71 } |
72 | 72 |
73 Type inferType(Scope sc) | 73 override Type inferType(Scope sc) |
74 { | 74 { |
75 //printf("ExpInitializer::inferType() %s\n", toChars()); | 75 //printf("ExpInitializer::inferType() %s\n", toChars()); |
76 exp = exp.semantic(sc); | 76 exp = exp.semantic(sc); |
77 exp = resolveProperties(sc, exp); | 77 exp = resolveProperties(sc, exp); |
78 | 78 |
89 t = Initializer.inferType(sc); | 89 t = Initializer.inferType(sc); |
90 | 90 |
91 return t; | 91 return t; |
92 } | 92 } |
93 | 93 |
94 Expression toExpression() | 94 override Expression toExpression() |
95 { | 95 { |
96 return exp; | 96 return exp; |
97 } | 97 } |
98 | 98 |
99 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 99 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
100 { | 100 { |
101 assert(false); | 101 assert(false); |
102 } | 102 } |
103 | 103 |
104 dt_t* toDt() | 104 override dt_t* toDt() |
105 { | 105 { |
106 dt_t* dt = null; | 106 dt_t* dt = null; |
107 | 107 |
108 exp = exp.optimize(WANT.WANTvalue); | 108 exp = exp.optimize(WANT.WANTvalue); |
109 exp.toDt(&dt); | 109 exp.toDt(&dt); |
110 | 110 |
111 return dt; | 111 return dt; |
112 } | 112 } |
113 | 113 |
114 ExpInitializer isExpInitializer() { return this; } | 114 override ExpInitializer isExpInitializer() { return this; } |
115 } | 115 } |