Files
swift-mirror/test/Parse/isolated_any.swift
Hamish Knight ff09cad05d [Parse] Add fix-it for unknown isolation in @isolated
Currently `any` is the only supported kind, so we
can suggest that.

rdar://130287211
2024-07-02 12:01:13 +01:00

16 lines
414 B
Swift

// RUN: %target-typecheck-verify-swift -disable-availability-checking
// REQUIRES: asserts
typealias FnType = @isolated(any) () -> ()
func testInParameter(function: @isolated(any) () -> ()) {}
func testLookahead() {
let array = [@isolated(any) () -> ()]()
_ = array
}
func testInvalidIsolation(_ x: @isolated(foo) () -> Void) {}
// expected-error@-1 {{expected 'any' as the isolation kind}} {{42-45=any}}