[FIR] Properly handle callable references which were resolved with error
This commit is contained in:
-8
@@ -1,8 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
fun a() {
|
||||
val x = 10
|
||||
foo(<!UNSUPPORTED!>::x<!>)
|
||||
}
|
||||
|
||||
fun foo(a: Any) {}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
fun a() {
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
fun eat(value: Any) {}
|
||||
|
||||
fun test(param: String) {
|
||||
val a = <!UNSUPPORTED!>::param<!>
|
||||
|
||||
val local = "local"
|
||||
val b = <!UNSUPPORTED!>::local<!>
|
||||
|
||||
val lambda = { -> }
|
||||
val g = <!UNSUPPORTED!>::lambda<!>
|
||||
|
||||
eat(<!UNSUPPORTED!>::param<!>)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
fun eat(value: Any) {}
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@ class Foo {
|
||||
fun main() {
|
||||
val f = Foo()
|
||||
val a: Int
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, <!UNSUPPORTED!>::a<!>) // no exception after fix
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, ::<!UNSUPPORTED!>a<!>) // no exception after fix
|
||||
<!UNRESOLVED_REFERENCE!>print<!>(<!UNINITIALIZED_VARIABLE!>a<!>)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -9,6 +9,6 @@ class Foo {
|
||||
fun main(x: Int) {
|
||||
val f = Foo()
|
||||
val a: Int
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, <!UNSUPPORTED!>::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