Introduce VariableDescriptorForObject interface

Add implementations
Use this interface instead of CLASS_OBJECT_DECLARATION key in BindingContext
This commit is contained in:
Pavel V. Talanov
2013-07-03 16:39:54 +04:00
committed by Alexander Udalov
parent dc5bc1488c
commit a57f74c278
16 changed files with 209 additions and 98 deletions
@@ -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);