From 5b59b47aa44a6aadc058852c4ee63246ef22e54b Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Tue, 3 Oct 2023 19:57:01 +0300 Subject: [PATCH] Implement ReadRandom for standardLibrary type --- languageserver/server/stdlib.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/languageserver/server/stdlib.go b/languageserver/server/stdlib.go index 82753922..f2d23085 100644 --- a/languageserver/server/stdlib.go +++ b/languageserver/server/stdlib.go @@ -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) {