mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
@Observable Macro supports properties with the package access modifier (#71061)
* `@Observable` Macro supports properties with the `package` access modifier #71060
* Cherry-pick "Move the tests for package scopes to the module interface tests" 4e274ce0a5
---------
Co-authored-by: Philippe Hausler <phausler@apple.com>
This commit is contained in:
committed by
GitHub
parent
4b440a1d80
commit
a1c49d0139
@@ -118,6 +118,7 @@ extension DeclModifierListSyntax {
|
||||
case .fileprivate: fallthrough
|
||||
case .private: fallthrough
|
||||
case .internal: fallthrough
|
||||
case .package: fallthrough
|
||||
case .public:
|
||||
return false
|
||||
default:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -module-name Library -plugin-path %swift-plugin-dir -disable-availability-checking
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -module-name Library -disable-availability-checking
|
||||
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -package-name Library -module-name Library -plugin-path %swift-plugin-dir -disable-availability-checking
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -package-name Library -module-name Library -disable-availability-checking
|
||||
// RUN: %FileCheck %s < %t/Library.swiftinterface
|
||||
|
||||
// REQUIRES: swift_swift_parser
|
||||
@@ -15,6 +15,7 @@ import Observation
|
||||
@Observable
|
||||
public class SomeClass {
|
||||
public var field = 3
|
||||
package var test = 4
|
||||
@ObservationIgnored public var ignored = 4
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user