74970ddfeb
#KT-12073 Fixed
11 lines
225 B
Kotlin
Vendored
11 lines
225 B
Kotlin
Vendored
// PROBLEM: none
|
|
data class Point(val x: Int)
|
|
|
|
operator fun Point.plus(other: Point) = Point(this.x + other.x)
|
|
|
|
operator fun Point.unaryMinus() = Point(-x)
|
|
|
|
fun test() {
|
|
val p = Point(1) + Point(2)
|
|
<caret>-Point(3)
|
|
} |