Commit Graph

2 Commits

Author SHA1 Message Date
Ellie Shin
0fe0d6d221 Allow Swift as a package name
Update AccessScope::isChildOf
Add more tests for package access level
Resolves rdar://106728606
2023-03-14 17:17:14 -07:00
Slava Pestov
a7e51721ce Sema: Fix minor inconsistencies with access control diagnostics
The various 'isExplicit' checks were wrong -- they should apply
to protocol requirements only, not protocol extension members.

Also, we weren't performing this check for type aliases in
protocols, so you would get a misleading diagnostic telling you
the type alias must be declared private/internal, when in fact
type aliases in protocols cannot have their own access control.

Finally, the "should be declared <X>" diagnostics (the
!isExplicit case) need to state the most visible access level
that will work, and in a few cases we would say private instead
of fileprivate here.
2018-06-15 13:23:58 -07:00