KT-4372 Invalid error position and failing to resolve invoke with receiver from other module #KT-4372 Fixed

This commit is contained in:
Svetlana Isakova
2014-01-13 19:05:21 +04:00
parent e95e505b5d
commit 8868da8c5f
3 changed files with 28 additions and 4 deletions
@@ -0,0 +1,22 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
//KT-4372 Invalid error position and failing to resolve invoke with receiver from other module
class Foo<TInner, TOuter> {
fun invoke(content: TInner.() -> Unit) {
}
}
// comment this function to fix the error below
fun <TInner, TOuter> Foo<TInner, TOuter>.invoke(name: String, content: TInner.() -> Unit) {}
enum class EnumClass(val x: String) {}
object Y {
val x = javaClass<EnumClass>() // javaClass unresolved in any file in this module
}
//declarations from library
val <T> T.javaClass : Class<T>
get() = throw Exception()
fun <reified T> javaClass() : Class<T> = throw Exception()