From 80b0748d75fe70febd89f02cf419e1644f67350d Mon Sep 17 00:00:00 2001
From: flywind <43030857+xflywind@users.noreply.github.com>
Date: Sat, 31 Oct 2020 19:06:13 +0800
Subject: fix #15651 (#15800)
* fix
* minor
---
tests/js/treprinifexpr.nim | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 tests/js/treprinifexpr.nim
(limited to 'tests/js/treprinifexpr.nim')
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
--
cgit 1.4.1-2-gfad0
ption>
This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror) | ahoang <ahoang@tilde.institute> |
blob: c81715cd8c46fc25ca02e1a798d21d7e898db786 (
plain) (
tree)