mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
21 lines
458 B
Swift
21 lines
458 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@_spi(Foo)
|
|
@globalActor
|
|
public struct SPIGA { // expected-note {{struct declared here}}
|
|
public actor Actor {}
|
|
public static let shared = Actor()
|
|
}
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@SPIGA // expected-error {{cannot use struct 'SPIGA' here; it is SPI}}
|
|
public struct PublicStruct {}
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@_spi(Foo)
|
|
@SPIGA
|
|
public struct SPIStruct {}
|