You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following Kotlin code doesn't produce the same output on both Kotlin "stock" compiler and the Kotlin-Scala.js compiler :
funmain(args:Array<String>) {
val myDouble =1.7
check(myDouble)
}
funcheck(a:Any) {
if (a isInt) println("$a is an Int")
if (a isDouble) println("$a is a Double")
if (a isLong) println("$a is a Long")
if (a !isInt) println("$a is not an Int")
if (a !isDouble) println("$a is not a Double")
if (a !isLong) println("$a is not a Long")
}
Output for KotlinJS compiler :
1.7 is an Int
1.7 is a Double
1.7 is not a Long
Output for Kotlin-Scala.js compiler :
1.7 is a Double
1.7 is not an Int
1.7 is not a Long
Need to investigate the reason behind this difference.
The text was updated successfully, but these errors were encountered:
The following Kotlin code doesn't produce the same output on both Kotlin "stock" compiler and the Kotlin-Scala.js compiler :
Output for KotlinJS compiler :
Output for Kotlin-Scala.js compiler :
Need to investigate the reason behind this difference.
The text was updated successfully, but these errors were encountered: