FIR checker: check if callable reference targets are allowed members
This commit is contained in:
committed by
Mikhail Glukhikh
parent
6769ce0e2b
commit
8d8ed4cc18
Vendored
+2
-2
@@ -7,6 +7,6 @@ enum class D
|
||||
fun main() {
|
||||
<!UNRESOLVED_REFERENCE!>::A<!>
|
||||
::B
|
||||
::C // KT-3465
|
||||
<!CALLABLE_REFERENCE_TO_ANNOTATION_CONSTRUCTOR!>::C<!> // KT-3465
|
||||
<!UNRESOLVED_REFERENCE!>::D<!>
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
annotation class Ann(val prop: String)
|
||||
|
||||
val annCtorRef = ::Ann
|
||||
val annCtorRef = <!CALLABLE_REFERENCE_TO_ANNOTATION_CONSTRUCTOR!>::Ann<!>
|
||||
val annClassRef = Ann::class
|
||||
val annPropRef = Ann::prop
|
||||
|
||||
Vendored
+4
-4
@@ -4,11 +4,11 @@ class A {
|
||||
fun A.extA(x: String) = x
|
||||
|
||||
fun main() {
|
||||
Int::extInt
|
||||
A::extA
|
||||
<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>Int::extInt<!>
|
||||
<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>A::extA<!>
|
||||
|
||||
eat(Int::extInt)
|
||||
eat(A::extA)
|
||||
eat(<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>Int::extInt<!>)
|
||||
eat(<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>A::extA<!>)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user