From 1e04b7af1c098a3deff37931ef33191644606a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Fri, 22 Sep 2023 10:04:59 -0700 Subject: [PATCH] initializer has no access modifier, but access to constructor is public --- runtime/sema/gen/main.go | 2 +- runtime/sema/gen/testdata/contract/test.golden.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/sema/gen/main.go b/runtime/sema/gen/main.go index 9238aec01c..b7778b0a97 100644 --- a/runtime/sema/gen/main.go +++ b/runtime/sema/gen/main.go @@ -1856,7 +1856,7 @@ func newDeclarationMember( if access == ast.AccessNotSpecified { switch declaration.DeclarationKind() { case common.DeclarationKindInitializer: - break + access = ast.AccessAll default: panic(fmt.Errorf( diff --git a/runtime/sema/gen/testdata/contract/test.golden.go b/runtime/sema/gen/testdata/contract/test.golden.go index 57a2fca534..1efdaeff66 100644 --- a/runtime/sema/gen/testdata/contract/test.golden.go +++ b/runtime/sema/gen/testdata/contract/test.golden.go @@ -81,7 +81,7 @@ func init() { var members = []*sema.Member{ sema.NewUnmeteredConstructorMember( TestType, - sema.PrimitiveAccess(ast.AccessNotSpecified), + sema.PrimitiveAccess(ast.AccessAll), Test_FooTypeName, Test_FooTypeConstructorType, Test_FooTypeConstructorDocString,