[FIR] Change priority of K2_VISIBILITY_ERROR CandidateApplicability
In K1 analogue of `K2_VISIBILITY_ERROR` is `K1_RUNTIME_ERROR`, so
candidates with `K2_VISIBILITY_ERROR` should win over innaplicable
candidates with `INAPPLICABLE`, `INAPPLICABLE_ARGUMENTS_MAPPING_ERROR`
or `INAPPLICABLE_WRONG_RECEIVER` applicability
This is needed to allow resolution to invisible symbols (and later
suppress error with `@Suppress("INVISIBLE_SYMBOL", "INVISIBLE_REFERENCE")`
^KT-55026 Fixed
^KT-55234
This commit is contained in:
committed by
Space Team
parent
6c6525ecde
commit
f3da26946b
@@ -28,9 +28,9 @@ import a.MyJavaClass
|
||||
|
||||
val <!EXPOSED_PROPERTY_TYPE!>mc1<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>()
|
||||
|
||||
val x = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!INVISIBLE_REFERENCE!>NestedClass<!>.<!INVISIBLE_REFERENCE!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
val x = <!NO_COMPANION_OBJECT!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!NO_COMPANION_OBJECT!>NestedClass<!>.<!INVISIBLE_REFERENCE!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!NO_COMPANION_OBJECT!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
|
||||
//FILE: c.kt
|
||||
package a.c
|
||||
@@ -39,6 +39,6 @@ import a.MyJavaClass
|
||||
|
||||
val <!EXPOSED_PROPERTY_TYPE!>mc1<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>()
|
||||
|
||||
val x = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!INVISIBLE_REFERENCE!>NestedClass<!>.<!INVISIBLE_REFERENCE!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
val x = <!NO_COMPANION_OBJECT!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!NO_COMPANION_OBJECT!>NestedClass<!>.<!INVISIBLE_REFERENCE!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!NO_COMPANION_OBJECT!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
|
||||
+1
-1
@@ -14,5 +14,5 @@ public class Foo {
|
||||
// FILE: 1.kt
|
||||
|
||||
fun main() {
|
||||
javaPackage.Foo.<!INVISIBLE_REFERENCE!>Bar<!>.<!INVISIBLE_REFERENCE!>doSmth<!>()
|
||||
javaPackage.Foo.<!NO_COMPANION_OBJECT!>Bar<!>.<!INVISIBLE_REFERENCE!>doSmth<!>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user