Mercurial > projects > ddmd
comparison dmd/TypedefDeclaration.d @ 154:14feb7ae01a6
* changed the build system to build a release version if the debug one compiles
and enabled warnings
+ reduced warnings by adding appriopriate overrides
+ IfStatement.interpret()
+ ScopeStatement.interpret()
+ TypeSArray.constConv()
+ TypedefDeclaration.syntaxCopy()
* fixed a bug in StringExp
author | trass3r |
---|---|
date | Wed, 15 Sep 2010 15:32:31 +0200 |
parents | af1bebfd96a4 |
children | e3afd1303184 |
comparison
equal
deleted
inserted
replaced
148:fe2e1b93e88f | 154:14feb7ae01a6 |
---|---|
56 Type clone() | 56 Type clone() |
57 { | 57 { |
58 assert(false); | 58 assert(false); |
59 } | 59 } |
60 } | 60 } |
61 override Dsymbol syntaxCopy(Dsymbol) | 61 override Dsymbol syntaxCopy(Dsymbol s) |
62 { | 62 { |
63 assert(false); | 63 Type basetype = this.basetype.syntaxCopy(); |
64 | |
65 Initializer init = null; | |
66 if (this.init) | |
67 init = this.init.syntaxCopy(); | |
68 | |
69 assert(!s); | |
70 TypedefDeclaration st; | |
71 st = new TypedefDeclaration(loc, ident, basetype, init); | |
72 version(_DH) | |
73 { | |
74 // Syntax copy for header file | |
75 if (!htype) // Don't overwrite original | |
76 { | |
77 if (type) // Make copy for both old and new instances | |
78 { | |
79 htype = type.syntaxCopy(); | |
80 st.htype = type.syntaxCopy(); | |
81 } | |
82 } | |
83 else // Make copy of original for new instance | |
84 st.htype = htype.syntaxCopy(); | |
85 if (!hbasetype) | |
86 { | |
87 if (basetype) | |
88 { | |
89 hbasetype = basetype.syntaxCopy(); | |
90 st.hbasetype = basetype.syntaxCopy(); | |
91 } | |
92 } | |
93 else | |
94 st.hbasetype = hbasetype.syntaxCopy(); | |
95 } | |
96 return st; | |
64 } | 97 } |
65 | 98 |
66 override void semantic(Scope sc) | 99 override void semantic(Scope sc) |
67 { | 100 { |
68 //printf("TypedefDeclaration::semantic(%s) sem = %d\n", toChars(), sem); | 101 //printf("TypedefDeclaration::semantic(%s) sem = %d\n", toChars(), sem); |