mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Compute existential member access limitations for storage declarations
This commit is contained in:
@@ -9878,8 +9878,15 @@ performMemberLookup(ConstraintKind constraintKind, DeclNameRef memberName,
|
||||
// member access if the member's signature references 'Self'.
|
||||
if (instanceTy->isExistentialType() &&
|
||||
decl->getDeclContext()->getSelfProtocolDecl()) {
|
||||
if (!isMemberAvailableOnExistential(instanceTy, decl)) {
|
||||
switch (isMemberAvailableOnExistential(instanceTy, decl)) {
|
||||
case ExistentialMemberAccessLimitation::Unsupported:
|
||||
// TODO: Write-only accesses are not supported yet.
|
||||
case ExistentialMemberAccessLimitation::WriteOnly:
|
||||
return true;
|
||||
|
||||
case ExistentialMemberAccessLimitation::ReadOnly:
|
||||
case ExistentialMemberAccessLimitation::None:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user