Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
67ac90ce0868ee0c9cd08d72460f16efecded549
/
.
/
compiler
/
testData
/
codegen
/
box
/
increment
/
kt36956.kt
blob: 2c9d533a3ab3e0f4091e7f054ab9e3c4f169d2c1 [
file
]
// LANGUAGE: -ForbidParenthesizedLhsInAssignments
class
Cell
(
var
x
:
Int
)
{
operator
fun
get
(
i
:
Int
)
=
x
operator
fun
set
(
i
:
Int
,
v
:
Int
)
{
x
=
v
}
}
fun box
():
String
{
val c
=
Cell
(
0
)
(
c
[
0
])++
if
(
c
[
0
]
!=
1
)
return
"Fail"
return
"OK"
}