Introduce VariableDescriptorForObject interface
Add implementations Use this interface instead of CLASS_OBJECT_DECLARATION key in BindingContext
This commit is contained in:
committed by
Alexander Udalov
parent
dc5bc1488c
commit
a57f74c278
+3
-4
@@ -254,10 +254,9 @@ public class AnnotationDescriptorResolveTest extends JetLiteFixture {
|
||||
|
||||
@NotNull
|
||||
private ClassDescriptor getLocalObjectDescriptor(@NotNull String name) {
|
||||
for (ClassDescriptor descriptor : context.getSliceContents(BindingContext.OBJECT_DECLARATION_CLASS).values()) {
|
||||
if (descriptor.getName().asString().equals(name)) {
|
||||
return descriptor;
|
||||
}
|
||||
ClassDescriptor localClassDescriptor = getLocalClassDescriptor(name);
|
||||
if (localClassDescriptor.getKind() == ClassKind.OBJECT) {
|
||||
return localClassDescriptor;
|
||||
}
|
||||
|
||||
fail("Failed to find local object " + name);
|
||||
|
||||
Reference in New Issue
Block a user