mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Friend PR: apple/swift-experimental-string-processing#282. Also remove the `-enable-experimental-pairwise-build-block` flag when building regex modules as the feature is already on by default.
24 lines
566 B
Swift
24 lines
566 B
Swift
// RUN: %target-typecheck-verify-swift -enable-bare-slash-regex -disable-availability-checking
|
|
// REQUIRES: swift_in_compiler
|
|
|
|
_ = /abc/
|
|
_ = #/abc/#
|
|
_ = ##/abc/##
|
|
|
|
func foo<T>(_ x: T...) {}
|
|
foo(/abc/, #/abc/#, ##/abc/##)
|
|
|
|
let arr = [/abc/, #/abc/#, ##/abc/##]
|
|
|
|
_ = /\w+/.self
|
|
_ = #/\w+/#.self
|
|
_ = ##/\w+/##.self
|
|
|
|
_ = /#\/\#\\/
|
|
_ = #/#/\/\#\\/#
|
|
_ = ##/#|\|\#\\/##
|
|
|
|
_ = (#/[*/#, #/+]/#, #/.]/#)
|
|
// expected-error@-1 {{cannot parse regular expression: quantifier '+' must appear after expression}}
|
|
// expected-error@-2 {{cannot parse regular expression: expected ']'}}
|