Generate super classes and overridden functions in proper scope

Such references require proper scope so that local symbols are bound.
Example:

```
fun <T> outer() {
    abstract class ALocal<S : T> {
        abstract fun bar()
    }

    class Local<S : T> : ALocal<S>() {
        override fun bar() {}
    }
}
```

Here local classes have type parameters with upper bounds depending on
function type parameters, and members overriding members in other local
classes.
This commit is contained in:
Dmitry Petrov
2018-02-22 10:00:02 +03:00
parent 8fef0f0535
commit e89047d2cc
54 changed files with 2463 additions and 79 deletions
@@ -276,6 +276,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
doTest(fileName);
}
@TestMetadata("localClassWithOverrides.kt")
public void testLocalClassWithOverrides() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/localClassWithOverrides.kt");
doTest(fileName);
}
@TestMetadata("localDelegatedProperties.kt")
public void testLocalDelegatedProperties() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/localDelegatedProperties.kt");
@@ -1257,12 +1263,24 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
doTest(fileName);
}
@TestMetadata("javaMethod.kt")
public void testJavaMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaMethod.kt");
doTest(fileName);
}
@TestMetadata("javaNestedClass.kt")
public void testJavaNestedClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaNestedClass.kt");
doTest(fileName);
}
@TestMetadata("javaStaticMethod.kt")
public void testJavaStaticMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaStaticMethod.kt");
doTest(fileName);
}
@TestMetadata("kotlinInnerClass.kt")
public void testKotlinInnerClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/kotlinInnerClass.kt");