12 lines
197 B
Kotlin
Vendored
12 lines
197 B
Kotlin
Vendored
package foo
|
|
|
|
class myInt(a: Int) {
|
|
val value = a;
|
|
|
|
operator fun plus(other: myInt): myInt = myInt(value + other.value)
|
|
}
|
|
|
|
fun box(): Boolean {
|
|
|
|
return (myInt(3) + myInt(5)).value == 8
|
|
} |