mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Applies swift-experimental-string-processing#68 in regex literal type inference. Regex literals with captures will have type `Regex<Tuple{n}<Substring, {Captures...}>>`. This is a temporary thing that allows us to define generic constraints on captures. We will switch back to native tuples once we have variadic generics.
6 lines
241 B
Swift
6 lines
241 B
Swift
// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing
|
|
// REQUIRES: swift_in_compiler
|
|
|
|
// Note there is purposefully no trailing newline here.
|
|
// expected-error@+1 {{unterminated regex literal}}
|
|
var unterminated = '/xy |