Files
swift-mirror/test/StringProcessing/Sema/string_processing_import.swift
Richard Wei 065ac52c0d Add frontend flag -disable-implicit-string-processing-module-import.
We add a new flag to disable the implicit import of `_StringProcessing`, similar to `-disable-implicit-concurrency-module-import`. We need this to build `_RegexParser` when `-enable-experimental-string-processing` is enabled by default, because `_StringProcessing` currently imports `_RegexParser` publicly (non-implementation-only).
2022-04-04 13:55:47 -07:00

8 lines
393 B
Swift

// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing -disable-implicit-string-processing-module-import
// REQUIRES: swift_in_compiler
// expected-error @+1 {{missing 'Regex' declaration, probably because the '_StringProcessing' module was not imported properly}}
let r0 = #/./#
// expected-error @+1 {{cannot find type 'Regex' in scope}}
let _: Regex<Substring> = r0