summary refs log tree commit diff stats
path: root/tests/enum/tenum.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-04-13 23:50:15 -0700
committerGitHub <noreply@github.com>2021-04-14 08:50:15 +0200
commit840e13deb79db7b072595658e6aa8328d55d7889 (patch)
treeacc4998ef25087f9efc36225a4e9bd67fab4d40b /tests/enum/tenum.nim
parentfe77c3c72fe1fde4f41286158ba612c02083dfe2 (diff)
downloadNim-840e13deb79db7b072595658e6aa8328d55d7889.tar.gz
type with same name in different scope now works (#17710)
* type with same name in different scope now works
* fix tests/enum/tenum.nim which was wrong because it was affected by this bug
Diffstat (limited to 'tests/enum/tenum.nim')
-rw-r--r--tests/enum/tenum.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/enum/tenum.nim b/tests/enum/tenum.nim
index aa338ee2c..97fd4c68c 100644
--- a/tests/enum/tenum.nim
+++ b/tests/enum/tenum.nim
@@ -6,7 +6,7 @@ ABCDC
 foo
 first0second32third64
 my value A1my value Bconc2valueCabc4abc
-my value A0my value Bconc1valueCabc3valueC
+my value A0my value Bconc1valueCabc3abc
 '''
 """
 
@@ -124,7 +124,8 @@ block tnamedfields:
   # trick the optimizer with a variable:
   var x = valueD
   echo valueA, ord(valueA), valueB, ord(valueB), valueC, valueD, ord(valueD), x
-
+  doAssert $x == $valueD, $x
+  doAssert $x == "abc", $x
 
 
 block toptions: