Skip to content

Commit

Permalink
work around compiler bug
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Nov 11, 2021
1 parent 2ce1858 commit 96b1500
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions beacon_chain/spec/datatypes/base.nim
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,10 @@ proc readValue*(reader: var JsonReader, value: var ForkDigest)
static: doAssert high(int) >= high(int32)

# `ValidatorIndex` seq handling.
template `[]`*[T](a: var seq[T], b: ValidatorIndex): var T =
a[b.int]

template `[]=`*[T](a: var seq[T], b: ValidatorIndex, c: T) =
a[b.int] = c

template `[]`*[T](a: seq[T], b: ValidatorIndex): auto =
template `[]`*[T](a: seq[T], b: ValidatorIndex): auto = # Also var seq (!)
a[b.int]

# `ValidatorIndex` Nim integration
Expand Down

0 comments on commit 96b1500

Please sign in to comment.