Files
kotlin-fork/idea/testData/refactoring/inline/addParenthesis/IfIntoArrayAccessBrackets.kt.after
T
Evgeny Gerashchenko 55b221776b Inline adds parentheses when it is necessary.
Test data for Remove Unnecessary Parentheses was updated, since parentheses in foo && (bar && baz) is not "unnecessary": removing it changes program semantics.

 #KT-2637 in progress
2013-07-23 21:43:04 +04:00

6 lines
103 B
Plaintext

import java.util.ArrayList
fun f() {
val a = ArrayList<Int>()
println(a[if (true) 1 else 2])
}