Revision ac4b68fbf45853ba4b9e327cb42f93f42a8fa252 authored by Ellie Shin on 17 March 2023, 04:14:20 UTC, committed by Ellie Shin on 17 March 2023, 04:14:20 UTC
1 parent f2c68fb
Raw File
spi_global_actor.swift
// RUN: %target-typecheck-verify-swift

// REQUIRES: concurrency

@available(SwiftStdlib 5.1, *)
@_spi(Foo)
@globalActor
public struct SPIGA { // expected-note {{type 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 {}
back to top