mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
'@preconcurrency' imports open up memory safety holes with respect to Sendable, which are diagnosed under strict memory safety + strict concurrency checking. Allow one to write '@unsafe' on those imports to silence the diagnostic about it.
10 lines
384 B
Swift
10 lines
384 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module-path %t/unsafe_swift_decls.swiftmodule %S/Inputs/unsafe_swift_decls.swift
|
|
|
|
// RUN: %target-typecheck-verify-swift -strict-memory-safety -enable-experimental-feature StrictConcurrency -I %t
|
|
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: swift_feature_StrictConcurrency
|
|
|
|
@preconcurrency @unsafe import unsafe_swift_decls
|