We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4184714 commit e0d62e9Copy full SHA for e0d62e9
test/ModuleInterface/Observable.swift
@@ -0,0 +1,22 @@
1
+// RUN: %empty-directory(%t)
2
+// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -module-name Library -plugin-path %swift-host-lib-dir/plugins -disable-availability-checking
3
+// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -module-name Library -disable-availability-checking
4
+// RUN: %FileCheck %s < %t/Library.swiftinterface
5
+
6
+import _Observation
7
8
+// CHECK-NOT: @Observable
9
+// CHECK-NOT: @ObservationIgnored
10
+// CHECK-NOT: @ObservationTracked
11
12
+@Observable
13
+public class SomeClass {
14
+ public var field = 3
15
+ @ObservationIgnored public var ignored = 4
16
+}
17
18
+public func requiresObservable<T: Observable>(_: T) { }
19
20
+@inlinable func useObservable(sc: SomeClass) {
21
+ requiresObservable(sc)
22
0 commit comments