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
This commit is contained in:
Timothee Cour 2021-04-13 23:50:15 -07:00 • committed by GitHub
commit 840e13deb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 133 additions and 9 deletions

View file

@ -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: