Files
kotlin-fork/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.kt
T
Mikhail Zarechenskiy 040f4e90ce Update test data as operator 'mod' became deprecated
Revert this commit after changing 'mod' to 'rem' in stdlib
2016-12-09 16:59:25 +03:00

26 lines
562 B
Kotlin
Vendored

fun fooInt(p: Int) = p
fun fooLong(p: Long) = p
fun fooByte(p: Byte) = p
fun fooShort(p: Short) = p
fun test() {
fooInt(1 + 1)
fooByte(1 + 1)
fooLong(1 + 1)
fooShort(1 + 1)
fooInt(1 * 1)
fooByte(1 * 1)
fooLong(1 * 1)
fooShort(1 * 1)
fooInt(1 / 1)
fooByte(1 / 1)
fooLong(1 / 1)
fooShort(1 / 1)
fooInt(1 <!DEPRECATED_BINARY_MOD_AS_REM!>%<!> 1)
fooByte(1 <!DEPRECATED_BINARY_MOD_AS_REM!>%<!> 1)
fooLong(1 <!DEPRECATED_BINARY_MOD_AS_REM!>%<!> 1)
fooShort(1 <!DEPRECATED_BINARY_MOD_AS_REM!>%<!> 1)
}