Files
swift-mirror/test/SourceKit/CodeComplete/rdar95772803.swift
Rintaro Ishizaki 47f18d492e [ASTGen] Move regex literal parsing from SwiftCompilerSources to ASTGen
ASTGen always builds with the host Swift compiler, without requiring
bootstrapping, and is enabled in more places. Move the regex literal
parsing logic there so it is enabled in more host environments, and
makes use of CMake's Swift support. Enable all of the regex literal
tests when ASTGen is built, to ensure everything is working.

Remove the "AST" and "Parse" Swift modules from SwiftCompilerSources,
because they are no longer needed.
2023-11-16 10:59:23 -08:00

15 lines
506 B
Swift

var foo: Double { 1 / 2 }
var bar: Regex<Substring> { /x/ }
var baz: Regex<Substring> { / x/ }
var qux: Regex<Substring> { / x}/ }
// Check that we are not crashing
// RUN: %sourcekitd-test \
// RUN: -req=complete -pos=2:18 %s -- -enable-bare-slash-regex %s == \
// RUN: -req=complete -pos=3:28 %s -- -enable-bare-slash-regex %s == \
// RUN: -req=complete -pos=4:28 %s -- -enable-bare-slash-regex %s == \
// RUN: -req=complete -pos=5:28 %s -- -enable-bare-slash-regex %s
// REQUIRES: swift_swift_parser