Get a callable reference expression to report an error on it properly, taking into account possible wrapping
^KT-42620 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// SKIP_TXT
|
||||
|
||||
class Foo
|
||||
|
||||
fun main1() = when {
|
||||
else -> <!UNRESOLVED_REFERENCE!>Foo::plus<!>
|
||||
}
|
||||
|
||||
fun main2() = if (true) <!UNRESOLVED_REFERENCE!>Foo::minus<!> else <!UNRESOLVED_REFERENCE!>Foo::times<!>
|
||||
|
||||
fun main3() = if (true) { <!UNRESOLVED_REFERENCE!>Foo::minus<!> } else { <!UNRESOLVED_REFERENCE!>Foo::times<!> }
|
||||
|
||||
fun main4() = try { <!UNRESOLVED_REFERENCE!>Foo::minus<!> } finally { <!UNRESOLVED_REFERENCE!>Foo::times<!> }
|
||||
|
||||
fun main5() = <!UNRESOLVED_REFERENCE!>Foo::minus<!> ?: <!UNRESOLVED_REFERENCE!>Foo::times<!>
|
||||
@@ -0,0 +1,15 @@
|
||||
// SKIP_TXT
|
||||
|
||||
class Foo
|
||||
|
||||
fun main1() = when {
|
||||
else -> Foo::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>plus<!>
|
||||
}
|
||||
|
||||
fun main2() = if (true) Foo::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>minus<!> else Foo::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>times<!>
|
||||
|
||||
fun main3() = if (true) { Foo::<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>minus<!> } else { Foo::<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>times<!> }
|
||||
|
||||
fun main4() = try { Foo::<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>minus<!> } finally { <!UNUSED_EXPRESSION!>Foo::<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>times<!><!> }
|
||||
|
||||
fun main5() = Foo::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>minus<!> ?: Foo::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>times<!>
|
||||
Reference in New Issue
Block a user