Skip to content

Commit

Permalink
add a test case for #22190 in case of regression (#22217)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored Jul 4, 2023
1 parent c513e37 commit 31ba104
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/vm/tvmmisc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -712,3 +712,24 @@ block:
var y = "356"
merge(x, y)
doAssert x == "3bc"

block: # bug #22190
type
EVMFork = enum
Berlin
Istanbul
Shanghai

const
Vm2OpAllForks =
{EVMFork.low .. EVMFork.high}

vm2OpExecBlockData = [(forks: Vm2OpAllForks)]

proc mkOpTable(selected: EVMFork): bool =
selected notin vm2OpExecBlockData[0].forks

const
tab = mkOpTable(Berlin)

doAssert not tab

0 comments on commit 31ba104

Please sign in to comment.