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