mirror of
https://github.com/apple/swift.git
synced 2025-12-25 12:15:36 +01:00
Instead of returning a parser error, which results in generic parser recovery that skips until the next decl, return an `ErrorExpr` so we can continue parsing.
16 lines
591 B
Swift
16 lines
591 B
Swift
// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing
|
|
// REQUIRES: swift_in_compiler
|
|
|
|
_ = re'(' // expected-error {{expected ')'}}
|
|
|
|
// FIXME: Should be 'group openings'
|
|
_ = re')' // expected-error {{closing ')' does not balance any groups openings}}
|
|
|
|
let s = #/\\/''/ // expected-error {{unterminated regex literal}}
|
|
_ = #|\| // expected-error {{unterminated regex literal}}
|
|
_ = #// // expected-error {{unterminated regex literal}}
|
|
_ = re'x // expected-error {{unterminated regex literal}}
|
|
|
|
// expected-error@+1 {{unterminated regex literal}}
|
|
var unterminated = #/xy
|