Skip to content

Commit aa9fdbb

Browse files
committed
[TaskLocal] don't omit availability checking in tests
This is to make sure the expanded macros can properly work with availability and values which may require availability
1 parent f0f8e9b commit aa9fdbb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/Concurrency/Runtime/async_task_locals_basic.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-run-simple-swift( -plugin-path %swift-plugin-dir -Xfrontend -disable-availability-checking -parse-as-library %import-libdispatch) | %FileCheck %s
1+
// RUN: %target-run-simple-swift( -plugin-path %swift-plugin-dir -parse-as-library %import-libdispatch) | %FileCheck %s
22

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
@@ -33,6 +33,17 @@ enum TL {
3333
static var clazz: ClassTaskLocal?
3434
}
3535

36+
@TaskLocal
37+
@available(SwiftStdlib 5.1, *)
38+
var globalTaskLocal: StringLike = StringLike("<not-set>")
39+
40+
@available(SwiftStdlib 5.10, *)
41+
struct LessAvailable {}
42+
43+
@TaskLocal
44+
@available(SwiftStdlib 5.10, *)
45+
var globalLessAvailable: LessAvailable?
46+
3647
@available(SwiftStdlib 5.1, *)
3748
final class ClassTaskLocal: Sendable {
3849
init() {

0 commit comments

Comments
 (0)