PSI Unifier: Use convention-based call for array access expressions when comparing elements by resolved calls
#KT-8312 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun fn(index : Int, list: List<()->Unit>) {
|
||||
when {
|
||||
index in list.indices -> <selection>list[index]</selection>()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun fn(index : Int, list: List<()->Unit>) {
|
||||
when {
|
||||
index in list.indices -> {
|
||||
val function = list[index]
|
||||
function()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user