diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/js/timplicit_nodecl.nim | 13 | ||||
-rw-r--r-- | tests/js/tvarargs.nim | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/js/timplicit_nodecl.nim b/tests/js/timplicit_nodecl.nim new file mode 100644 index 000000000..79a921815 --- /dev/null +++ b/tests/js/timplicit_nodecl.nim @@ -0,0 +1,13 @@ +discard """ + output: '''22 +22''' +""" + +# test implicit nodecl +block: + {. emit: "var importMe = 22;" .} + var + a {. importc: "importMe" .}: int + importMe {. importc .}: int + echo a + echo importMe diff --git a/tests/js/tvarargs.nim b/tests/js/tvarargs.nim index e2366d7a9..2ddb421f8 100644 --- a/tests/js/tvarargs.nim +++ b/tests/js/tvarargs.nim @@ -6,7 +6,7 @@ type log*: proc() {.nimcall varargs.} Console = ref ConsoleObj -var console* {.importc nodecl.}: Console +var console* {.importc.}: Console when isMainModule: console.log "Hello, world" |