Skip to content

Commit 1184c08

Browse files
committed
fix sample compilation
1 parent ef868f1 commit 1184c08

File tree

1 file changed

+5
-5
lines changed
  • sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library

1 file changed

+5
-5
lines changed

sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/Calculator.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ class Calculator {
1212
val engine = JavaScriptEngine()
1313
val testScript = "a+b"
1414

15-
val intA = a.toIntOrNull()
16-
val intB = b.toIntOrNull()
15+
val numberA = a.toDoubleOrNull()
16+
val numberB = b.toDoubleOrNull()
1717

18-
val context = if (intA != null && intB != null) {
18+
val context = if (numberA != null && numberB != null) {
1919
mapOf(
20-
"a" to JsType.IntNum(intA),
21-
"b" to JsType.IntNum(intB)
20+
"a" to JsType.DoubleNum(numberA),
21+
"b" to JsType.DoubleNum(numberB)
2222
)
2323
} else {
2424
mapOf(

0 commit comments

Comments
 (0)