Interner fixed: looks item up in parent first
This commit is contained in:
committed by
Alexander Udalov
parent
6481bb658f
commit
930217c877
+1
-1
@@ -110,7 +110,7 @@ public class DescriptorSerializer {
|
||||
|
||||
//TODO builder.addAnnotations()
|
||||
|
||||
DescriptorSerializer local = this;//createChildSerializer();
|
||||
DescriptorSerializer local = createChildSerializer();
|
||||
|
||||
for (TypeParameterDescriptor typeParameterDescriptor : descriptor.getTypeParameters()) {
|
||||
builder.addTypeParameters(local.typeParameter(typeParameterDescriptor));
|
||||
|
||||
+3
@@ -52,6 +52,9 @@ public final class Interner<T> {
|
||||
|
||||
public int intern(@NotNull T obj) {
|
||||
assert parent == null || parent.all.size() == firstIndex : "Parent changed in parallel with child: indexes will be wrong";
|
||||
if (parent != null && parent.interned.contains(obj)) {
|
||||
return parent.intern(obj);
|
||||
}
|
||||
if (interned.contains(obj)) {
|
||||
return interned.get(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user