mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
14 lines
328 B
Swift
14 lines
328 B
Swift
// RUN: %target-typecheck-verify-swift -enable-bare-slash-regex -disable-availability-checking
|
|
|
|
import RegexBuilder
|
|
|
|
extension Regex where Output == Substring {
|
|
init(_ x: String) {}
|
|
}
|
|
|
|
func foo() {
|
|
_ = Regex {
|
|
0 // expected-error {{static method 'buildExpression' requires that 'Int' conform to 'RegexComponent'}}
|
|
}
|
|
}
|