Skip to content

Commit

Permalink
Implement ReadRandom for standardLibrary type
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Oct 3, 2023
1 parent 55644ee commit 5b59b47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions languageserver/server/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ func (l standardLibrary) GenerateAccountID(_ common.Address) (uint64, error) {
panic(errors.NewUnreachableError())
}

func (l standardLibrary) ReadRandom(_ []byte) error {
// Implementation should never be called,
// only its definition is used for type-checking
panic(errors.NewUnreachableError())
}

func newStandardLibrary() (result standardLibrary) {
result.baseValueActivation = sema.NewVariableActivation(sema.BaseValueActivation)
for _, valueDeclaration := range stdlib.DefaultStandardLibraryValues(result) {
Expand Down

0 comments on commit 5b59b47

Please sign in to comment.