Support number conversion for binary 'rem' operator

This commit is contained in:
Mikhail Zarechenskiy
2016-12-13 20:55:23 +03:00
parent 62ac91a121
commit 42d867b3bf
5 changed files with 70 additions and 2 deletions
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
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)
}
public operator fun Int.rem(other: Int): Int = 0