Files
Nim/tests/js/t20235.nim
Jake Leahy 7ae7832f76 JS backend properly extends string with setLen (#21087)
* Add test case

* Extend string with '0' when setting length to be longer
2022-12-13 08:43:37 +01:00

12 lines
124 B
Nim

discard """
action: "run"
output: "0 4"
"""
proc main =
var s = ""
s.setLen(4)
echo s[0].ord, " ", s.len
main()