Mercurial > projects > qtd
comparison generator/dgenerator.cpp @ 363:3b0545d4d479
Fixed enums in designated interfaces
author | Max Samukha <maxter@maxter.com> |
---|---|
date | Thu, 10 Jun 2010 00:57:32 +0300 |
parents | beaf4a2974d7 |
children | a084e2df3776 |
comparison
equal
deleted
inserted
replaced
362:bcbfffef4f9e | 363:3b0545d4d479 |
---|---|
146 s = "int"; | 146 s = "int"; |
147 } else { | 147 } else { |
148 if (option & EnumAsInts) | 148 if (option & EnumAsInts) |
149 s = "int"; | 149 s = "int"; |
150 else | 150 else |
151 s = d_type->typeEntry()->qualifiedTargetLangName(); | 151 { |
152 // Hack around forward-referencing the implementing class in an interface. | |
153 if (context->typeEntry()->designatedInterface() && d_type->typeEntry()->javaQualifier() == context->name()) | |
154 s = d_type->name(); | |
155 else | |
156 s = d_type->typeEntry()->qualifiedTargetLangName(); | |
157 } | |
158 | |
152 } | 159 } |
153 } else if (d_type->isFlags()) { // qtd2 begin | 160 } else if (d_type->isFlags()) { // qtd2 begin |
154 if (d_type->isFlags() && ((FlagsTypeEntry *)d_type->typeEntry())->forceInteger()) { | 161 if (d_type->isFlags() && ((FlagsTypeEntry *)d_type->typeEntry())->forceInteger()) { |
155 if (option & BoxedPrimitive) | 162 if (option & BoxedPrimitive) |
156 s = "java.lang.Integer"; | 163 s = "java.lang.Integer"; |