mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] Diagnose that we cannot infer the key path type when binding to a hole
This commit is contained in:
@@ -1323,3 +1323,17 @@ AllowKeyPathRootTypeMismatch::create(ConstraintSystem &cs, Type lhs, Type rhs,
|
||||
return new (cs.getAllocator())
|
||||
AllowKeyPathRootTypeMismatch(cs, lhs, rhs, locator);
|
||||
}
|
||||
|
||||
SpecifyKeyPathRootType *
|
||||
SpecifyKeyPathRootType::create(ConstraintSystem &cs,
|
||||
ConstraintLocator *locator) {
|
||||
return new (cs.getAllocator())
|
||||
SpecifyKeyPathRootType(cs, locator);
|
||||
}
|
||||
|
||||
bool SpecifyKeyPathRootType::diagnose(const Solution &solution,
|
||||
bool asNote) const {
|
||||
UnableToInferKeyPathRootFailure failure(solution, getLocator());
|
||||
|
||||
return failure.diagnose(asNote);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user