KT-12628: !! is now correctly added to array expressions
(cherry picked from commit 56c9d7e)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
47493c1a65
commit
a9c30e878b
@@ -0,0 +1,4 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
operator fun Int.get(row: Int, column: Int) = this
|
||||
fun foo(arg: Int?) = arg<caret>[42, 13]
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
operator fun Int.get(row: Int, column: Int) = this
|
||||
fun foo(arg: Int?) = arg!![42, 13]
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
operator fun Int.get(row: Int, column: Int) = if (row == column) this else null
|
||||
fun foo(arg: Int) = arg[42, 13]<caret>.hashCode()
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
operator fun Int.get(row: Int, column: Int) = if (row == column) this else null
|
||||
fun foo(arg: Int) = arg[42, 13]!!.hashCode()
|
||||
Reference in New Issue
Block a user