mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
24 lines
816 B
Swift
24 lines
816 B
Swift
// REQUIRES: swift_swift_parser
|
|
|
|
// RUN: %target-typecheck-verify-swift -disable-availability-checking -parse-as-library -enable-experimental-feature Macros -enable-experimental-feature ExtensionMacros -plugin-path %swift-host-lib-dir/plugins
|
|
|
|
// REQUIRES: observation
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: objc_interop
|
|
// UNSUPPORTED: use_os_stdlib
|
|
// UNSUPPORTED: back_deployment_runtime
|
|
// REQUIRES: rdar112623492
|
|
|
|
import Observation
|
|
|
|
@Observable // expected-error {{'@Observable' cannot be applied to actor type 'MyActor'}}
|
|
actor MyActor {}
|
|
|
|
@Observable // expected-error {{'@Observable' cannot be applied to enumeration type 'MyEnum'}}
|
|
enum MyEnum {
|
|
case myCase // required for macro invocation
|
|
}
|
|
|
|
@Observable // expected-error {{'@Observable' cannot be applied to struct type 'MyStruct'}}
|
|
struct MyStruct {}
|