Skip to content

Commit df72468

Browse files
committed
[AST] Don’t include propagated type locations in the source range of a type pattern.
1 parent e986a15 commit df72468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/Pattern.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ SourceRange TuplePattern::getSourceRange() const {
349349
}
350350

351351
SourceRange TypedPattern::getSourceRange() const {
352-
if (isImplicit()) {
352+
if (isImplicit() || isPropagatedType()) {
353353
// If a TypedPattern is implicit, then its type is definitely implicit, so
354354
// we should ignore its location. On the other hand, the sub-pattern can
355355
// be explicit or implicit.

0 commit comments

Comments
 (0)