6e6ffa12a6
- New module ":compiler:backend.wasm"
- Initial compiler infra (driver, phaser, context)
- Subset of Wasm AST
- Skeleton of IR -> Wasm AST
- Wasm AST -> WAT transformer
- Testing infra
- SpiderMonkey jsshell tool
20 lines
607 B
Kotlin
Vendored
20 lines
607 B
Kotlin
Vendored
// EXPECTED_REACHABLE_NODES: 1284
|
|
// http://youtrack.jetbrains.com/issue/KT-5345
|
|
// KT-5345 (Javascript) Type mismatch on Int / Float division
|
|
// If any of Number operands is floating-point, the result should be float too.
|
|
|
|
package foo
|
|
|
|
fun box(): String {
|
|
assertEquals(0.5f, 1 / 2.0f, "Int / Float")
|
|
|
|
assertEquals(0.5, 1 / 2.0, "Int / Double")
|
|
|
|
assertEquals(0.5f, 1.toShort() / 2.0f, "Short / Float")
|
|
assertEquals(0.5, 1.toShort() / 2.0, "Short / Double")
|
|
|
|
assertEquals(0.5f, 1.toByte() / 2.0f, "Byte / Float")
|
|
assertEquals(0.5, 1.toByte() / 2.0, "Byte / Double")
|
|
|
|
return "OK"
|
|
} |