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> {
3136
3136
if (accessScope.isPublic ())
3137
3137
return true ;
3138
3138
3139
- // Testable allows access to internal details.
3140
- if (value->getDeclContext ()->getParentModule ()->isTestingEnabled () &&
3141
- accessScope.isInternal ())
3142
- return true ;
3143
-
3144
3139
if (auto accessor = dyn_cast<AccessorDecl>(value))
3145
3140
// Accessors are as safe as their storage.
3146
3141
if (isDeserializationSafe (accessor->getStorage ()))
@@ -3189,7 +3184,8 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
3189
3184
#endif
3190
3185
3191
3186
// Private imports allow safe access to everything.
3192
- if (DC->getParentModule ()->arePrivateImportsEnabled ())
3187
+ if (DC->getParentModule ()->arePrivateImportsEnabled () ||
3188
+ DC->getParentModule ()->isTestingEnabled ())
3193
3189
return ;
3194
3190
3195
3191
// Ignore things with no access level.
Original file line number Diff line number Diff line change 11
11
// RUN: -enable-library-evolution -swift-version 5 \
12
12
// RUN: -Xllvm -debug-only=Serialization \
13
13
// RUN: -enable-testing 2>&1 \
14
- // RUN: | %FileCheck --check-prefixes=SAFETY-PRIVATE,NO-SAFETY-INTERNAL-NOT %s
14
+ // RUN: | %FileCheck --check-prefixes=DISABLED %s
15
15
16
16
/// Don't mark decls as unsafe when private import is enabled.
17
17
// RUN: %target-swift-frontend -emit-module %s \
Original file line number Diff line number Diff line change 11
11
// RUN: -enable-library-evolution -swift-version 5 \
12
12
// RUN: -Xllvm -debug-only=Serialization \
13
13
// RUN: -enable-testing 2>&1 \
14
- // RUN: | %FileCheck --check-prefixes=SAFETY-PRIVATE,NO-SAFETY-INTERNAL %s
14
+ // RUN: | %FileCheck --check-prefixes=DISABLED %s
15
15
16
16
/// Don't mark decls as unsafe when private import is enabled.
17
17
// RUN: %target-swift-frontend -emit-module %s \
You can’t perform that action at this time.
0 commit comments