mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This ensures that the brace range will include all contained items. The previous scheme of choosing the end location of the last item was not accurate because for pattern bindings decls we also push the var decls as items, but they don't have the full source range of the pattern binding decl. Fixes rdar://15190792. Swift SVN r9293
7 lines
227 B
Swift
7 lines
227 B
Swift
// RUN: %swift %s -parse -verify
|
|
|
|
// Make sure source ranges satisfy the verifier.
|
|
for foo in [1, 2] { // expected-note {{to match this opening '{'}}
|
|
var x = foo
|
|
// expected-error@+1{{expected '}' at end of brace statement}}
|