File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ // REQUIRES: swift_swift_parser
2+
3+ // RUN: %target-typecheck-verify-swift -disable-availability-checking -parse-as-library -enable-experimental-feature InitAccessors -enable-experimental-feature Macros -enable-experimental-feature ExtensionMacros -plugin-path %swift-host-lib-dir/plugins
4+
5+ // Asserts is required for '-enable-experimental-feature InitAccessors'.
6+ // REQUIRES: asserts
7+
8+ // REQUIRES: observation
9+ // REQUIRES: concurrency
10+ // REQUIRES: objc_interop
11+ // UNSUPPORTED: use_os_stdlib
12+ // UNSUPPORTED: back_deployment_runtime
13+
14+ import Observation
15+
16+ @Observable // expected-error {{'@Observable' cannot be applied to actor type 'MyActor'}}
17+ actor MyActor { }
18+
19+ @Observable // expected-error {{'@Observable' cannot be applied to enumeration type 'MyEnum'}}
20+ enum MyEnum {
21+ case myCase // required for macro invocation
22+ }
23+
24+ @Observable // expected-error {{'@Observable' cannot be applied to struct type 'MyStruct'}}
25+ struct MyStruct { }
You can’t perform that action at this time.
0 commit comments