diff options
Diffstat (limited to 'tests/js/treprinifexpr.nim')
-rw-r--r-- | tests/js/treprinifexpr.nim | 18 |
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 |