mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Tiny cleanup for matchTypes()
This commit is contained in:
@@ -4608,16 +4608,15 @@ public:
|
||||
inline bool isFailure() const { return Kind == SolutionKind::Error; }
|
||||
inline bool isAmbiguous() const { return Kind == SolutionKind::Unsolved; }
|
||||
|
||||
static TypeMatchResult success(ConstraintSystem &cs) {
|
||||
static TypeMatchResult success() {
|
||||
return {SolutionKind::Solved};
|
||||
}
|
||||
|
||||
static TypeMatchResult failure(ConstraintSystem &cs,
|
||||
ConstraintLocatorBuilder location) {
|
||||
static TypeMatchResult failure() {
|
||||
return {SolutionKind::Error};
|
||||
}
|
||||
|
||||
static TypeMatchResult ambiguous(ConstraintSystem &cs) {
|
||||
static TypeMatchResult ambiguous() {
|
||||
return {SolutionKind::Unsolved};
|
||||
}
|
||||
|
||||
@@ -4722,15 +4721,15 @@ public: // FIXME: public due to statics in CSSimplify.cpp
|
||||
ConstraintLocatorBuilder locator);
|
||||
|
||||
TypeMatchResult getTypeMatchSuccess() {
|
||||
return TypeMatchResult::success(*this);
|
||||
return TypeMatchResult::success();
|
||||
}
|
||||
|
||||
TypeMatchResult getTypeMatchFailure(ConstraintLocatorBuilder locator) {
|
||||
return TypeMatchResult::failure(*this, locator);
|
||||
return TypeMatchResult::failure();
|
||||
}
|
||||
|
||||
TypeMatchResult getTypeMatchAmbiguous() {
|
||||
return TypeMatchResult::ambiguous(*this);
|
||||
return TypeMatchResult::ambiguous();
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user