Lines 32-39
Link Here
|
32 |
public TypeDeclaration referenceContext; |
32 |
public TypeDeclaration referenceContext; |
33 |
public TypeReference superTypeReference; |
33 |
public TypeReference superTypeReference; |
34 |
|
34 |
|
35 |
public final static char[] IncompleteHierarchy = new char[] {'h', 'a', 's', ' ', 'i', 'n', 'c', 'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', ' ', 'h', 'i', 'e', 'r', 'a', 'r', 'c', 'h', 'y'}; |
|
|
36 |
|
37 |
public ClassScope(Scope parent, TypeDeclaration context) { |
35 |
public ClassScope(Scope parent, TypeDeclaration context) { |
38 |
super(CLASS_SCOPE, parent); |
36 |
super(CLASS_SCOPE, parent); |
39 |
this.referenceContext = context; |
37 |
this.referenceContext = context; |
Lines 60-72
Link Here
|
60 |
private void buildFields() { |
58 |
private void buildFields() { |
61 |
boolean hierarchyIsInconsistent = referenceContext.binding.isHierarchyInconsistent(); |
59 |
boolean hierarchyIsInconsistent = referenceContext.binding.isHierarchyInconsistent(); |
62 |
if (referenceContext.fields == null) { |
60 |
if (referenceContext.fields == null) { |
63 |
if (hierarchyIsInconsistent) { // 72468 |
61 |
referenceContext.binding.fields = Binding.NO_FIELDS; |
64 |
referenceContext.binding.fields = new FieldBinding[1]; |
|
|
65 |
referenceContext.binding.fields[0] = |
66 |
new FieldBinding(IncompleteHierarchy, TypeBinding.INT, ClassFileConstants.AccPrivate, referenceContext.binding, null); |
67 |
} else { |
68 |
referenceContext.binding.fields = Binding.NO_FIELDS; |
69 |
} |
70 |
return; |
62 |
return; |
71 |
} |
63 |
} |
72 |
// count the number of fields vs. initializers |
64 |
// count the number of fields vs. initializers |
Lines 81-88
Link Here
|
81 |
} |
73 |
} |
82 |
} |
74 |
} |
83 |
|
75 |
|
84 |
if (hierarchyIsInconsistent) |
|
|
85 |
count++; |
86 |
// iterate the field declarations to create the bindings, lose all duplicates |
76 |
// iterate the field declarations to create the bindings, lose all duplicates |
87 |
FieldBinding[] fieldBindings = new FieldBinding[count]; |
77 |
FieldBinding[] fieldBindings = new FieldBinding[count]; |
88 |
HashtableOfObject knownFieldNames = new HashtableOfObject(count); |
78 |
HashtableOfObject knownFieldNames = new HashtableOfObject(count); |
Lines 135-143
Link Here
|
135 |
} |
125 |
} |
136 |
fieldBindings = newFieldBindings; |
126 |
fieldBindings = newFieldBindings; |
137 |
} |
127 |
} |
138 |
if (hierarchyIsInconsistent) |
|
|
139 |
fieldBindings[count++] = new FieldBinding(IncompleteHierarchy, TypeBinding.INT, ClassFileConstants.AccPrivate, referenceContext.binding, null); |
140 |
|
141 |
if (count != fieldBindings.length) |
128 |
if (count != fieldBindings.length) |
142 |
System.arraycopy(fieldBindings, 0, fieldBindings = new FieldBinding[count], 0, count); |
129 |
System.arraycopy(fieldBindings, 0, fieldBindings = new FieldBinding[count], 0, count); |
143 |
for (int i = 0; i < count; i++) |
130 |
for (int i = 0; i < count; i++) |