File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
test/Serialization/Safety Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -3136,11 +3136,6 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
31363136 if (accessScope.isPublic ())
31373137 return true ;
31383138
3139- // Testable allows access to internal details.
3140- if (value->getDeclContext ()->getParentModule ()->isTestingEnabled () &&
3141- accessScope.isInternal ())
3142- return true ;
3143-
31443139 if (auto accessor = dyn_cast<AccessorDecl>(value))
31453140 // Accessors are as safe as their storage.
31463141 if (isDeserializationSafe (accessor->getStorage ()))
@@ -3189,7 +3184,8 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
31893184#endif
31903185
31913186 // Private imports allow safe access to everything.
3192- if (DC->getParentModule ()->arePrivateImportsEnabled ())
3187+ if (DC->getParentModule ()->arePrivateImportsEnabled () ||
3188+ DC->getParentModule ()->isTestingEnabled ())
31933189 return ;
31943190
31953191 // Ignore things with no access level.
Original file line number Diff line number Diff line change 1111// RUN: -enable-library-evolution -swift-version 5 \
1212// RUN: -Xllvm -debug-only=Serialization \
1313// RUN: -enable-testing 2>&1 \
14- // RUN: | %FileCheck --check-prefixes=SAFETY-PRIVATE,NO-SAFETY-INTERNAL-NOT %s
14+ // RUN: | %FileCheck --check-prefixes=DISABLED %s
1515
1616/// Don't mark decls as unsafe when private import is enabled.
1717// RUN: %target-swift-frontend -emit-module %s \
Original file line number Diff line number Diff line change 1111// RUN: -enable-library-evolution -swift-version 5 \
1212// RUN: -Xllvm -debug-only=Serialization \
1313// RUN: -enable-testing 2>&1 \
14- // RUN: | %FileCheck --check-prefixes=SAFETY-PRIVATE,NO-SAFETY-INTERNAL %s
14+ // RUN: | %FileCheck --check-prefixes=DISABLED %s
1515
1616/// Don't mark decls as unsafe when private import is enabled.
1717// RUN: %target-swift-frontend -emit-module %s \
You can’t perform that action at this time.
0 commit comments