From 96b1500247c75d7ea0219072d1d6a36e53c7996c Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 11 Nov 2021 16:52:25 +0100 Subject: [PATCH] work around compiler bug --- beacon_chain/spec/datatypes/base.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/beacon_chain/spec/datatypes/base.nim b/beacon_chain/spec/datatypes/base.nim index 88c56f7574..c75e869e28 100644 --- a/beacon_chain/spec/datatypes/base.nim +++ b/beacon_chain/spec/datatypes/base.nim @@ -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