summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-10-31 19:06:13 +0800
committerGitHub <noreply@github.com>2020-10-31 12:06:13 +0100
commit80b0748d75fe70febd89f02cf419e1644f67350d (patch)
treea9091cb17c75fa221a17c5bdf67829b86b2c2f23 /tests/js
parent8115b655e77297e3d1ede5889de211a6a4dbad7b (diff)
downloadNim-80b0748d75fe70febd89f02cf419e1644f67350d.tar.gz
fix #15651 (#15800)
* fix

* minor
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/treprinifexpr.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/js/treprinifexpr.nim b/tests/js/treprinifexpr.nim
new file mode 100644
index 000000000..09ded18b9
--- /dev/null
+++ b/tests/js/treprinifexpr.nim
@@ -0,0 +1,18 @@
+type
+  Enum = enum A
+
+let
+  enumVal = A
+  tmp = if true: $enumVal else: $enumVal
+
+let
+  intVal = 12
+  tmp2 = if true: repr(intVal) else: $enumVal
+
+let
+  strVal = "123"
+  tmp3 = if true: repr(strVal) else: $strVal
+
+let
+  floatVal = 12.4
+  tmp4 = if true: repr(floatVal) else: $floatVal
\ No newline at end of file