KT-13181 Unresolved reference when referencing a type alias from a different module

Add corresponding resolution code.
This commit is contained in:
Dmitry Petrov
2016-09-01 15:40:11 +03:00
parent 6428a7655d
commit e0cdad30e4
3 changed files with 37 additions and 4 deletions
@@ -0,0 +1,17 @@
// FILE: A.kt
class Foo<out T>(val t: T) {
typealias Bar = (T) -> String
fun baz(b: Bar) = b(t)
}
// FILE: B.kt
class FooTest {
fun baz(): String {
val b: Foo<String>.Bar = { "OK" }
return Foo("").baz(b)
}
}
fun box(): String =
FooTest().baz()
@@ -208,4 +208,10 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt");
doTest(fileName);
}
@TestMetadata("typeAliasesKt13181.kt")
public void testTypeAliasesKt13181() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt");
doTest(fileName);
}
}