Refactoring & clarification: implement new FIR tower resolver
This commit is contained in:
+1
-1
@@ -5,5 +5,5 @@ class Outer {
|
||||
|
||||
fun test() {
|
||||
Outer()::Inner
|
||||
Outer()::Nested
|
||||
<!UNRESOLVED_REFERENCE!>Outer()::Nested<!>
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/callableReference/bound/referenceToStaticMethodOnInstance.fir.kt
Vendored
+2
-2
@@ -9,6 +9,6 @@ public class A {
|
||||
enum class E { EN }
|
||||
|
||||
fun test() {
|
||||
A()::test
|
||||
E.EN::valueOf
|
||||
<!UNRESOLVED_REFERENCE!>A()::test<!>
|
||||
<!UNRESOLVED_REFERENCE!>E.EN::valueOf<!>
|
||||
}
|
||||
|
||||
+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)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package foo
|
||||
|
||||
fun test() {
|
||||
<!UNRESOLVED_REFERENCE!>foo::test<!>
|
||||
foo::test
|
||||
}
|
||||
|
||||
// FILE: qualifiedName.kt
|
||||
@@ -12,5 +12,5 @@ fun test() {
|
||||
package foo.bar
|
||||
|
||||
fun test() {
|
||||
<!UNRESOLVED_REFERENCE!>foo.bar::test<!>
|
||||
foo.bar::test
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,14 +14,14 @@ class A {
|
||||
|
||||
fun A.foo(): String = "A"
|
||||
|
||||
val x0 = A::foo
|
||||
val x0 = <!UNRESOLVED_REFERENCE!>A::foo<!>
|
||||
|
||||
val x1 = ofType<(A) -> Unit>(A::foo)
|
||||
val x2 = ofType<KProperty1<A, Int>>(A::foo)
|
||||
val x3: KProperty1<A, Int> = A::foo
|
||||
val x4: (A) -> String = A::foo
|
||||
|
||||
val y0 = A::bar
|
||||
val y0 = <!UNRESOLVED_REFERENCE!>A::bar<!>
|
||||
val y1 = ofType<(A) -> Unit>(A::bar)
|
||||
val y2 = ofType<KProperty1<A, Int>>(A::bar)
|
||||
val y3: KProperty1<A, Int> = A::bar
|
||||
|
||||
Reference in New Issue
Block a user