diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-06-05 13:04:02 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-06-05 13:04:02 +0200 |
commit | 62376c065733340f5f62b58556e26e9b3ec5a2f0 (patch) | |
tree | d823b78700d3fd46d63d6f8b7af1bd6de244a81b /lib/pure | |
parent | f8326ad4c047f5d45817d0424dfb0b17aa17b538 (diff) | |
parent | c5f7d553e969bd90223570059c199c8459b16a54 (diff) | |
download | Nim-62376c065733340f5f62b58556e26e9b3ec5a2f0.tar.gz |
Merge pull request #2824 from yglukhov/js-ct-lambda-lifting
Perform lambda lifting for compile-time stuff when targeting JS.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/unittest.nim | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index 092b1fba2..dbbd3cabc 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -99,8 +99,9 @@ template test*(name: expr, body: stmt): stmt {.immediate, dirty.} = body except: - checkpoint("Unhandled exception: " & getCurrentExceptionMsg()) - echo getCurrentException().getStackTrace() + when not defined(js): + checkpoint("Unhandled exception: " & getCurrentExceptionMsg()) + echo getCurrentException().getStackTrace() fail() finally: @@ -114,9 +115,7 @@ proc checkpoint*(msg: string) = template fail* = bind checkpoints for msg in items(checkpoints): - # this used to be 'echo' which now breaks due to a bug. XXX will revisit - # this issue later. - stdout.writeln msg + echo msg when not defined(ECMAScript): if abortOnError: quit(1) |