FIR checker: introduce NO_(GET|SET)_METHOD
Besides introducing new diagnostics, this commit unifies source usages for array accesses in PSI & LT.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
651fd4ad9f
commit
e1c80ac75c
@@ -96,7 +96,7 @@ fun case_7() {
|
||||
fun case_8(y: MutableList<Boolean>) {
|
||||
var x: Boolean? = true
|
||||
if (x != null) {
|
||||
<!INAPPLICABLE_CANDIDATE!>y[if (true) {x = null;0} else 0] = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!>
|
||||
<!INAPPLICABLE_CANDIDATE!>y[if (true) {x = null;0} else 0]<!> = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,6 @@ fun case_10() {
|
||||
fun case_11(y: MutableList<MutableList<Int>>) {
|
||||
var x: Int? = 10
|
||||
if (x != null) {
|
||||
<!INAPPLICABLE_CANDIDATE!>y[if (true) {x = null;0} else 0][x] = 10<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>y[if (true) {x = null;0} else 0][x]<!> = 10
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
fun <T : List<T>> Inv<out T>.case_1() {
|
||||
if (this is MutableList<*>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>
|
||||
<!INAPPLICABLE_CANDIDATE!><!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>[0] = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>[1]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!><!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>[0]<!> = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>[1]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user