File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3146,7 +3146,7 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
31463146 // A decl is safe if formally accessible publicly.
31473147 auto accessScope = value->getFormalAccessScope (/* useDC=*/ nullptr ,
31483148 /* treatUsableFromInlineAsPublic=*/ true );
3149- if (accessScope.isPublic ())
3149+ if (accessScope.isPublic () || accessScope. isPackage () )
31503150 return true ;
31513151
31523152 if (auto accessor = dyn_cast<AccessorDecl>(value))
Original file line number Diff line number Diff line change 1717// RUN: -package-name MyPackage -I %t \
1818// RUN: -enable-experimental-feature AccessLevelOnImport
1919
20+ // RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
21+ // RUN: -package-name MyPackage -I %t \
22+ // RUN: -enable-deserialization-safety \
23+ // RUN: -enable-experimental-feature AccessLevelOnImport
24+
2025/// A client outside of the package raises errors.
2126// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
2227// RUN: -package-name NotMyPackage -I %t \
You can’t perform that action at this time.
0 commit comments