Files
kotlin-fork/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.kt
T
Dmitriy Novozhilov 7917e511ed [FE 1.0] Disable INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning by default
Also remove sinceVersion parameter from
  ApproximateIntegerLiteralTypesInReceiverPosition language feature

^KT-48992 Fixed
2021-09-29 21:23:22 +03:00

28 lines
547 B
Kotlin
Vendored

// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
fun fooInt(p: Int) = p
fun fooLong(p: Long) = p
fun fooByte(p: Byte) = p
fun fooShort(p: Short) = p
fun test() {
fooInt(1.plus(1))
fooByte(1.plus(1))
fooLong(1.plus(1))
fooShort(1.plus(1))
fooInt(1.times(1))
fooByte(1.times(1))
fooLong(1.times(1))
fooShort(1.times(1))
fooInt(1.div(1))
fooByte(1.div(1))
fooLong(1.div(1))
fooShort(1.div(1))
fooInt(1.rem(1))
fooByte(1.rem(1))
fooLong(1.rem(1))
fooShort(1.rem(1))
}