Skip to content

Commit

Permalink
Fix availability in new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DougGregor committed Jun 14, 2022
1 parent 55a92da commit fe26d15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/Concurrency/sendable_functions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@Sendable func globalFunc() { }

@available(SwiftStdlib 5.1, *)
actor A {
var state: Bool = false

Expand All @@ -18,6 +19,8 @@ actor A {
}
}

@available(SwiftStdlib 5.1, *)
@MainActor @Sendable func globalActorFunc() { } // expected-warning{{main actor-isolated synchronous global function 'globalActorFunc()' cannot be marked as '@Sendable'}}

@available(SwiftStdlib 5.1, *)
@MainActor @Sendable func globalActorFuncAsync() async { }

0 comments on commit fe26d15

Please sign in to comment.