Files
swift-mirror/test/SPI/spi_global_actor.swift
Allan Shortlidge ac8aec32ea Sema: Correct the decl kind in a resilience diagnostic.
Not everything is a type, type checker.
2024-10-26 09:26:39 -07:00

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 {}