mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Ignore patterns in linked expression analysis (#18487)
Fixes an assertion hit in "pattern in binary expression" case. rdar://problem/41071587
This commit is contained in:
@@ -286,6 +286,10 @@ case (_, var e, 3) +++ (1, 2, 3):
|
||||
// expected-error@-1{{'_' can only appear in a pattern}}
|
||||
// expected-error@-2{{'var' binding pattern cannot appear in an expression}}
|
||||
()
|
||||
case (let (_, _, _)) + 1:
|
||||
// expected-error@-1 2 {{'var' binding pattern cannot appear in an expression}}
|
||||
// expected-error@-2 {{expression pattern of type 'Int' cannot match values of type '(Int, Int, Int)'}}
|
||||
()
|
||||
}
|
||||
|
||||
// FIXME: We don't currently allow subpatterns for "isa" patterns that
|
||||
|
||||
Reference in New Issue
Block a user