Skip to content
7 changes: 6 additions & 1 deletion include/swift/AST/Expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3759,7 +3759,12 @@ class ClosureExpr : public AbstractClosureExpr {
assert(hasExplicitResultType() && "No explicit result type");
return ExplicitResultType;
}


TypeRepr *getExplicitResultTypeRepr() const {
assert(hasExplicitResultType() && "No explicit result type");
return ExplicitResultType.getTypeRepr();
}

void setExplicitResultType(SourceLoc arrowLoc, TypeLoc resultType) {
ArrowLoc = arrowLoc;
ExplicitResultType = resultType;
Expand Down
11 changes: 9 additions & 2 deletions lib/Sema/CSApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,17 @@ ConstraintLocator *Solution::getCalleeLocator(ConstraintLocator *locator,
}

ConstraintLocator *
Solution::getConstraintLocator(Expr *anchor,
Solution::getConstraintLocator(const Expr *anchor,
ArrayRef<LocatorPathElt> path) const {
auto &cs = getConstraintSystem();
return cs.getConstraintLocator(anchor, path);
return cs.getConstraintLocator(const_cast<Expr *>(anchor), path);
}

ConstraintLocator *
Solution::getConstraintLocator(ConstraintLocator *base,
ArrayRef<LocatorPathElt> path) const {
auto &cs = getConstraintSystem();
return cs.getConstraintLocator(base, path);
}

/// Return the implicit access kind for a MemberRefExpr with the
Expand Down
Loading