mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Lift a restriction on fixing of non-function calls on Any/AnyObject
Detect and diagnose situations where call is attempted directly on `Any` or `AnyObject` or member calls with `AnyObject` base which didn't match.
This commit is contained in:
@@ -7520,11 +7520,6 @@ ConstraintSystem::simplifyApplicableFnConstraint(
|
||||
desugar2->is<AnyMetatypeType>())
|
||||
return SolutionKind::Error;
|
||||
|
||||
if (auto objectTy = desugar2->lookThroughAllOptionalTypes()) {
|
||||
if (objectTy->isAny() || objectTy->isAnyObject())
|
||||
return SolutionKind::Error;
|
||||
}
|
||||
|
||||
// If there are any type variables associated with arguments/result
|
||||
// they have to be marked as "holes".
|
||||
type1.visit([&](Type subType) {
|
||||
|
||||
Reference in New Issue
Block a user