Files
kotlin-fork/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.kt
T
Mikhail Zarechenskiy 7595cb23ab Raise deprecation level for mod operators to ERROR in stdlib
#KT-25217 In Progress
2018-09-09 23:55:36 +03:00

31 lines
667 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.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.<!DEPRECATION_ERROR!>mod<!>(1))
fooByte(1.<!DEPRECATION_ERROR!>mod<!>(1))
fooLong(1.<!DEPRECATION_ERROR!>mod<!>(1))
fooShort(1.<!DEPRECATION_ERROR!>mod<!>(1))
fooInt(1.rem(1))
fooByte(1.rem(1))
fooLong(1.rem(1))
fooShort(1.rem(1))
}