Lines 166-173
Link Here
|
166 |
FieldBinding existingField; |
166 |
FieldBinding existingField; |
167 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
167 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
168 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
168 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
169 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
169 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
170 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
170 |
int max = fieldDeclarations == null ? 0 : fieldDeclarations.length; |
|
|
171 |
for (int i = 0; i < max; i++) { |
172 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
171 |
if (fieldDecl.binding == existingField) { |
173 |
if (fieldDecl.binding == existingField) { |
172 |
synthField.name = CharOperation.concat( |
174 |
synthField.name = CharOperation.concat( |
173 |
TypeConstants.SYNTHETIC_OUTER_LOCAL_PREFIX, |
175 |
TypeConstants.SYNTHETIC_OUTER_LOCAL_PREFIX, |
Lines 210-217
Link Here
|
210 |
FieldBinding existingField; |
212 |
FieldBinding existingField; |
211 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
213 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
212 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
214 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
213 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
215 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
214 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
216 |
int max = fieldDeclarations == null ? 0 : fieldDeclarations.length; |
|
|
217 |
for (int i = 0; i < max; i++) { |
218 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
215 |
if (fieldDecl.binding == existingField) { |
219 |
if (fieldDecl.binding == existingField) { |
216 |
if (this.scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5) { |
220 |
if (this.scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5) { |
217 |
synthField.name = CharOperation.concat( |
221 |
synthField.name = CharOperation.concat( |
Lines 255-262
Link Here
|
255 |
FieldBinding existingField; |
259 |
FieldBinding existingField; |
256 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
260 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
257 |
TypeDeclaration typeDecl = blockScope.referenceType(); |
261 |
TypeDeclaration typeDecl = blockScope.referenceType(); |
258 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
262 |
FieldDeclaration[] typeDeclarationFields = typeDecl.fields; |
259 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
263 |
int max = typeDeclarationFields == null ? 0 : typeDeclarationFields.length; |
|
|
264 |
for (int i = 0; i < max; i++) { |
265 |
FieldDeclaration fieldDecl = typeDeclarationFields[i]; |
260 |
if (fieldDecl.binding == existingField) { |
266 |
if (fieldDecl.binding == existingField) { |
261 |
blockScope.problemReporter().duplicateFieldInType(this, fieldDecl); |
267 |
blockScope.problemReporter().duplicateFieldInType(this, fieldDecl); |
262 |
break; |
268 |
break; |
Lines 294-300
Link Here
|
294 |
FieldBinding existingField; |
300 |
FieldBinding existingField; |
295 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
301 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
296 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
302 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
297 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
303 |
int max = (typeDecl.fields == null) ? 0 : typeDecl.fields.length; |
|
|
304 |
for (int i = 0; i < max; i++) { |
298 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
305 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
299 |
if (fieldDecl.binding == existingField) { |
306 |
if (fieldDecl.binding == existingField) { |
300 |
synthField.name = CharOperation.concat( |
307 |
synthField.name = CharOperation.concat( |
Lines 337-344
Link Here
|
337 |
FieldBinding existingField; |
344 |
FieldBinding existingField; |
338 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
345 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
339 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
346 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
340 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
347 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
341 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
348 |
int max = fieldDeclarations == null ? 0 : fieldDeclarations.length; |
|
|
349 |
for (int i = 0; i < max; i++) { |
350 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
342 |
if (fieldDecl.binding == existingField) { |
351 |
if (fieldDecl.binding == existingField) { |
343 |
synthField.name = CharOperation.concat( |
352 |
synthField.name = CharOperation.concat( |
344 |
TypeConstants.SYNTHETIC_ENUM_VALUES, |
353 |
TypeConstants.SYNTHETIC_ENUM_VALUES, |
Lines 425-432
Link Here
|
425 |
FieldBinding existingField; |
434 |
FieldBinding existingField; |
426 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
435 |
if ((existingField = getField(synthField.name, true /*resolve*/)) != null) { |
427 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
436 |
TypeDeclaration typeDecl = this.scope.referenceContext; |
428 |
for (int i = 0, max = typeDecl.fields.length; i < max; i++) { |
437 |
FieldDeclaration[] fieldDeclarations = typeDecl.fields; |
429 |
FieldDeclaration fieldDecl = typeDecl.fields[i]; |
438 |
int max = fieldDeclarations == null ? 0 : fieldDeclarations.length; |
|
|
439 |
for (int i = 0; i < max; i++) { |
440 |
FieldDeclaration fieldDecl = fieldDeclarations[i]; |
430 |
if (fieldDecl.binding == existingField) { |
441 |
if (fieldDecl.binding == existingField) { |
431 |
synthField.name = CharOperation.concat( |
442 |
synthField.name = CharOperation.concat( |
432 |
fieldName, |
443 |
fieldName, |
Lines 1256-1262
Link Here
|
1256 |
if (hasRestrictedAccess()) |
1267 |
if (hasRestrictedAccess()) |
1257 |
field.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess; |
1268 |
field.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess; |
1258 |
FieldDeclaration[] fieldDecls = this.scope.referenceContext.fields; |
1269 |
FieldDeclaration[] fieldDecls = this.scope.referenceContext.fields; |
1259 |
for (int f = 0, length = fieldDecls.length; f < length; f++) { |
1270 |
int length = fieldDecls == null ? 0 : fieldDecls.length; |
|
|
1271 |
for (int f = 0; f < length; f++) { |
1260 |
if (fieldDecls[f].binding != field) |
1272 |
if (fieldDecls[f].binding != field) |
1261 |
continue; |
1273 |
continue; |
1262 |
|
1274 |
|