Fix codegen of loaded class objects

Remove useless check and todo.

 #KT-2717 Fixed
 #KT-3142 Fixed
This commit is contained in:
Alexander Udalov
2013-01-09 15:40:21 +04:00
parent a2e453b759
commit 0fea6822c3
4 changed files with 18 additions and 10 deletions
@@ -1449,16 +1449,9 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
}
if (descriptor instanceof ClassDescriptor) {
PsiElement declaration = descriptorToDeclaration(bindingContext, descriptor);
if (declaration instanceof JetClass) {
final ClassDescriptor classObjectDescriptor = ((ClassDescriptor) descriptor).getClassObjectDescriptor();
assert classObjectDescriptor != null;
return StackValue.singleton(classObjectDescriptor, typeMapper);
}
else {
// todo ?
return StackValue.none();
}
ClassDescriptor classObjectDescriptor = ((ClassDescriptor) descriptor).getClassObjectDescriptor();
assert classObjectDescriptor != null : "Class object is not found for " + descriptor;
return StackValue.singleton(classObjectDescriptor, typeMapper);
}
if (descriptor instanceof TypeParameterDescriptor) {