FIR checker: check if callable reference targets are allowed members
This commit is contained in:
committed by
Mikhail Glukhikh
parent
6769ce0e2b
commit
8d8ed4cc18
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
fun a() {
|
||||
val x = 10
|
||||
foo(::x)
|
||||
foo(<!UNSUPPORTED!>::x<!>)
|
||||
}
|
||||
|
||||
fun foo(a: Any) {}
|
||||
fun foo(a: Any) {}
|
||||
|
||||
+1
-1
@@ -5,4 +5,4 @@ fun a() {
|
||||
foo(::<!UNSUPPORTED!>x<!>)
|
||||
}
|
||||
|
||||
fun foo(a: Any) {}
|
||||
fun foo(a: Any) {}
|
||||
|
||||
+4
-4
@@ -3,13 +3,13 @@
|
||||
fun eat(value: Any) {}
|
||||
|
||||
fun test(param: String) {
|
||||
val a = ::param
|
||||
val a = <!UNSUPPORTED!>::param<!>
|
||||
|
||||
val local = "local"
|
||||
val b = ::local
|
||||
val b = <!UNSUPPORTED!>::local<!>
|
||||
|
||||
val lambda = { -> }
|
||||
val g = ::lambda
|
||||
val g = <!UNSUPPORTED!>::lambda<!>
|
||||
|
||||
eat(::param)
|
||||
eat(<!UNSUPPORTED!>::param<!>)
|
||||
}
|
||||
|
||||
+2
-2
@@ -9,6 +9,6 @@ class Foo {
|
||||
fun main() {
|
||||
val f = Foo()
|
||||
val a: Int
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, ::a) // no exception after fix
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, <!UNSUPPORTED!>::a<!>) // no exception after fix
|
||||
<!UNRESOLVED_REFERENCE!>print<!>(<!UNINITIALIZED_VARIABLE!>a<!>)
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -9,6 +9,6 @@ class Foo {
|
||||
fun main(x: Int) {
|
||||
val f = Foo()
|
||||
val a: Int
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, ::x) // no exception after fix
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, <!UNSUPPORTED!>::x<!>) // no exception after fix
|
||||
<!UNRESOLVED_REFERENCE!>print<!>(<!UNINITIALIZED_VARIABLE!>a<!>)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user