summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-12-11 01:57:19 +0800
committerGitHub <noreply@github.com>2022-12-10 18:57:19 +0100
commit07be1791ba52d03dd2026c14ca34e5acc6ef9213 (patch)
tree7081ce61a295e0d295330920d6c3614ba3019cab /tests/vm
parent7a18c1ef44d2b43154364b431d0d6114ea1bd32e (diff)
downloadNim-07be1791ba52d03dd2026c14ca34e5acc6ef9213.tar.gz
fix #21045; getTime with vmopsDanger is broken; alternative to #21054 (#21056)
* fix #21045 getTime with vmopsDanger is broken; alternative to #21054

* typo
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/tvmopsDanger.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/vm/tvmopsDanger.nim b/tests/vm/tvmopsDanger.nim
new file mode 100644
index 000000000..5e7bac29a
--- /dev/null
+++ b/tests/vm/tvmopsDanger.nim
@@ -0,0 +1,10 @@
+discard """
+  cmd: "nim c --experimental:vmopsDanger -r $file"
+"""
+when defined(nimPreviewSlimSystem):
+  import std/assertions
+import std/times
+
+const foo = getTime()
+let bar = foo
+doAssert bar > low(Time)
\ No newline at end of file