Use type from compile time value for binary expression
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user