Skip to content

Commit 095a2f7

Browse files
committed
[AST] Mark init accessors as having internal access
This allows them to be used across files in the same module and requires explicit `@usableFromInline` annotation to be used inside of `@_alwaysEmitIntoClient` and `@inlinable` initializers. (cherry picked from commit dbe151b)
1 parent e10d961 commit 095a2f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/AccessRequests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ AccessLevelRequest::evaluate(Evaluator &evaluator, ValueDecl *D) const {
6565
// These are only needed to synthesize the setter.
6666
return AccessLevel::Private;
6767
case AccessorKind::Init:
68-
// These are only called from designated initializers.
69-
return AccessLevel::Private;
68+
// These are only called from within the same module.
69+
return AccessLevel::Internal;
7070
}
7171
}
7272

0 commit comments

Comments
 (0)