mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Diagnose typealiases of non-public types in inlinable functions (#23912)
...as a warning, since we didn't check this correctly in Swift 5. For parseable interfaces, these typealiases won't work at all.
This commit is contained in:
@@ -309,7 +309,8 @@ bool DeclContext::isGenericContext() const {
|
||||
/// domains, this ensures that only sufficiently-conservative access patterns
|
||||
/// are used.
|
||||
ResilienceExpansion DeclContext::getResilienceExpansion() const {
|
||||
for (const auto *dc = this; dc->isLocalContext(); dc = dc->getParent()) {
|
||||
for (const auto *dc = getLocalContext(); dc && dc->isLocalContext();
|
||||
dc = dc->getParent()) {
|
||||
// Default argument initializer contexts have their resilience expansion
|
||||
// set when they're type checked.
|
||||
if (isa<DefaultArgumentInitializer>(dc)) {
|
||||
|
||||
Reference in New Issue
Block a user