Fix 'No type in binding context for: <some class> from light class generation' exception

#KT-4668 Fixed
This commit is contained in:
Nikolay Krasko
2014-03-07 20:54:17 +04:00
parent 2964bb77b3
commit bbe9be5150
3 changed files with 17 additions and 0 deletions
@@ -198,6 +198,8 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
super.visitObjectDeclaration(declaration);
}
else {
if (!filter.shouldProcess(declaration)) return;
ClassDescriptor classDescriptor = bindingContext.get(CLASS, declaration);
// working around a problem with shallow analysis
if (classDescriptor == null) return;
@@ -0,0 +1,11 @@
package some
open class Test
object First: Test() // There's no info for Test in binding context
class Second {
fun <caret>foo(statement: First) { // Reference to First, to make lazy resolve put it into binding context
}
}
// For KT-4668
@@ -51,6 +51,10 @@ public class JetJavaFacadeTest extends JetLightCodeInsightFixtureTestCase {
doTestWrapMethod(false);
}
public void testObjectSubclassing() {
doTestWrapMethod(true);
}
public void testDoNotWrapFunInAnonymousObject() {
doTestWrapMethod(false);
}