Skip to content

Commit

Permalink
adds a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Nov 21, 2024
1 parent b7b1003 commit 21bd00b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/ccgbugs/tsamename3.nim
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,24 @@ block: # issue #22571
foo:
type Foo = object
doAssert $Foo() == "()"

block: # bug #7784
block:
type
Color = enum clrBlack, clrRed, clrGreen, clrBlue

var color = clrRed
doAssert(ord(color) == 1)
doAssert($color == "clrRed")

block:
type
Color = enum
clrBlack = "Black",
clrRed = "Red",
clrGreen = "Green",
clrBlue = "Blue"

var color = clrRed
doAssert(ord(color) == 1)
doAssert($color == "Red")

0 comments on commit 21bd00b

Please sign in to comment.