Refactoring & clarification: implement new FIR tower resolver
This commit is contained in:
+2
-2
@@ -16,6 +16,6 @@ fun test() {
|
||||
|
||||
Outer.Companion::Wrapper
|
||||
(Outer.Companion)::Wrapper
|
||||
Outer::Wrapper
|
||||
(Outer)::Wrapper
|
||||
<!UNRESOLVED_REFERENCE!>Outer::Wrapper<!>
|
||||
<!UNRESOLVED_REFERENCE!>(Outer)::Wrapper<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,5 +15,5 @@ fun take(f: () -> Unit) {}
|
||||
fun test() {
|
||||
B::foo checkType { <!UNRESOLVED_REFERENCE!>_<!><KFunction1<B, Unit>>() }
|
||||
|
||||
take(B::foo)
|
||||
<!INAPPLICABLE_CANDIDATE!>take<!>(B::foo)
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import test.A
|
||||
|
||||
fun foo(args: Array<String>) {
|
||||
val main2 = A::main
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction1<Array<String>, Unit>>(main2)
|
||||
<!INAPPLICABLE_CANDIDATE!>main2<!>(args)
|
||||
<!INAPPLICABLE_CANDIDATE!>(A::main)(args)<!>
|
||||
checkSubtype<KFunction1<Array<String>, Unit>>(main2)
|
||||
main2(args)
|
||||
(A::main)(args)
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -10,7 +10,7 @@ class A {
|
||||
val y = A::Nested
|
||||
|
||||
checkSubtype<KFunction0<Nested>>(x)
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction0<Nested>>(y)
|
||||
checkSubtype<KFunction0<Nested>>(y)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@@ -18,7 +18,7 @@ class A {
|
||||
::Nested
|
||||
val y = A::Nested
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction0<A.Nested>>(y)
|
||||
checkSubtype<KFunction0<A.Nested>>(y)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,6 @@ class B {
|
||||
<!UNRESOLVED_REFERENCE!>::Nested<!>
|
||||
val y = A::Nested
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction0<A.Nested>>(y)
|
||||
checkSubtype<KFunction0<A.Nested>>(y)
|
||||
}
|
||||
}
|
||||
compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromExtension.fir.kt
Vendored
+3
-3
@@ -7,15 +7,15 @@ class A {
|
||||
}
|
||||
|
||||
fun A.main() {
|
||||
::Nested
|
||||
<!UNRESOLVED_REFERENCE!>::Nested<!>
|
||||
val y = A::Nested
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction0<A.Nested>>(y)
|
||||
checkSubtype<KFunction0<A.Nested>>(y)
|
||||
}
|
||||
|
||||
fun Int.main() {
|
||||
<!UNRESOLVED_REFERENCE!>::Nested<!>
|
||||
val y = A::Nested
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction0<A.Nested>>(y)
|
||||
checkSubtype<KFunction0<A.Nested>>(y)
|
||||
}
|
||||
Vendored
+1
-1
@@ -9,5 +9,5 @@ class A {
|
||||
fun main() {
|
||||
val x = A::Nested
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KFunction0<A.Nested>>(x)
|
||||
checkSubtype<KFunction0<A.Nested>>(x)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user