implement system.default for the JS target
This commit is contained in:
parent
4be36d77f6
commit
1c64934f46
2 changed files with 30 additions and 11 deletions
|
|
@ -46,3 +46,17 @@ proc test2 =
|
|||
echo int(val)
|
||||
|
||||
test2()
|
||||
|
||||
|
||||
var someGlobal = default(array[5, int])
|
||||
for x in someGlobal: doAssert(x == 0)
|
||||
|
||||
proc tdefault =
|
||||
var x = default(int)
|
||||
doAssert(x == 0)
|
||||
proc inner(v: openarray[string]) =
|
||||
doAssert(v.len == 0)
|
||||
|
||||
inner(default(seq[string]))
|
||||
|
||||
tdefault()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue