Use type from compile time value for binary expression

This commit is contained in:
Natalia Ukhorskaya
2013-12-04 18:10:37 +04:00
parent 6331dd2308
commit 53a5264aaf
42 changed files with 685 additions and 42 deletions
@@ -0,0 +1,26 @@
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 % 1)
fooByte(1 % 1)
fooLong(1 % 1)
fooShort(1 % 1)
}