Skip to content

Commit 270be17

Browse files
committed
[Type checker] Drop unused parameter from coercePatternToType().
1 parent 8fb05af commit 270be17

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

lib/Sema/TypeCheckPattern.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -915,12 +915,7 @@ void repairTupleOrAssociatedValuePatternIfApplicable(
915915
/// Perform top-down type coercion on the given pattern.
916916
Pattern *TypeChecker::coercePatternToType(ContextualPattern pattern,
917917
Type type,
918-
TypeResolutionOptions options,
919-
TypeLoc tyLoc) {
920-
if (tyLoc.isNull()) {
921-
tyLoc = TypeLoc::withoutLoc(type);
922-
}
923-
918+
TypeResolutionOptions options) {
924919
auto P = pattern.getPattern();
925920
auto dc = pattern.getDeclContext();
926921
auto &Context = dc->getASTContext();

lib/Sema/TypeChecker.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,8 +959,7 @@ class TypeChecker final {
959959
///
960960
/// \returns the coerced pattern, or nullptr if the coercion failed.
961961
static Pattern *coercePatternToType(ContextualPattern pattern, Type type,
962-
TypeResolutionOptions options,
963-
TypeLoc tyLoc = TypeLoc());
962+
TypeResolutionOptions options);
964963
static bool typeCheckExprPattern(ExprPattern *EP, DeclContext *DC,
965964
Type type);
966965

0 commit comments

Comments
 (0)