Files
swift-mirror/test/StringProcessing/Sema/string_processing_module_shadowing.swift
Richard Wei 11154e5ff6 [Sema] Allow code to shadow definitions in implicit _StringProcessing module.
Treat _StringProcessing decls as if it were declared in the Swift module, just like how _Concurrency is treated (#34642).
2022-05-02 16:31:52 -07:00

12 lines
512 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/ShadowsStringProcessing.swiftmodule -module-name ShadowsStringProcessing %S/Inputs/ShadowsStringProcessing.swift -disable-availability-checking
// RUN: %target-typecheck-verify-swift -I %t -enable-experimental-string-processing -disable-availability-checking
import ShadowsStringProcessing
func f(_ t : Regex<Substring>) -> Bool {
return t.someProperty == "123"
}
func g(_: _StringProcessing.Regex<Substring>) {}