diff --git a/builtin/builtin.js b/builtin/builtin.js index f38db67..bf1145c 100644 --- a/builtin/builtin.js +++ b/builtin/builtin.js @@ -1,7 +1,8 @@ /* START builtins */ function _printf(msg) { - process.stdout.write(msg); + // Message is casted to string to prevent crash + process.stdout.write(msg.toString()); } /* END builtins */ diff --git a/examples/playground.sb b/examples/playground.sb index 502a6ee..6b9a030 100644 --- a/examples/playground.sb +++ b/examples/playground.sb @@ -1,6 +1,6 @@ fn main() { - let arr = ["Foo", "Bar"] + let arr = [1, 2, 3] for x in arr { _printf(x)