Files
swift-mirror/test/ModuleInterface/task_local_attr.swiftinterface
Holly Borla 7ded57b162 [Macros] Ignore the @TaskLocal macro attached to vars with projected values.
VarDecls with `@_projectedValueProperty` have already had the property
wrapper transform applied. This only impacts swiftinterfaces, and if
a swiftinterface was produced against a Concurrency library that does
not declare `TaskLocal` as a macro, we need to ignore the macro to avoid
producing duplicate declarations. This is only needed temporarily until
all swiftinterfaces have been built against the Concurrency library
containing the new macro declaration.
2024-05-22 18:05:49 -07:00

21 lines
607 B
Plaintext

// swift-interface-format-version: 1.0
// swift-compiler-version: Swift version 6.0
// swift-module-flags: -swift-version 5 -disable-availability-checking
// RUN: %empty-directory(%t)
// RUN: %target-swift-typecheck-module-from-interface(%s)
import Swift
import _Concurrency
@_hasMissingDesignatedInitializers final public class C {
@_Concurrency.TaskLocal @_projectedValueProperty($x) public static var x: Swift.Int? {
get
}
public static var $x: _Concurrency.TaskLocal<Swift.Int?> {
get
@available(*, unavailable, message: "use '$myTaskLocal.withValue(_:do:)' instead")
set
}
}