Invariant violated error


#1

Hi,

reco check gives me the following error message:

Error: error(s) found while checking c:…\reco_sha3\main.go

error: C:…\go\src\reco_sha3.reco-work\gopath\src\crypto\sha3\sha3.go:154:6 invariant violated

Any pointers to help solve it will be gratefully received.

Code is here: https://github.com/foolmarks/reco_sha3

thanks,
Mark


#2

Hi Mark,

This is a bug in our part. iota is a predeclared identifier in the Go spec (https://golang.org/ref/spec#Iota). We do not allow you to redeclare it. Naming that function something besides iota should fix the issue.

I’ll track this bug internally as well.

Josh


#3

Thanks Josh - renaming the function to iotaa fixed that problem but has uncovered others which I’ll detail in another post.