Commit Graph

8 Commits

Author SHA1 Message Date
treastrain / Tanaka Ryoga
a1c49d0139 @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>
2024-04-09 13:32:03 -07:00
Saleem Abdulrasool
99453fc2e8 test: introduce a new %swift-plugin-dir macro
Use this to define the macro location rather than the "host" dir (which
is actually for the build and not the host).  Furthermore, on Windows,
the build dir is /usr/lib/swift as the host content is in the SDK.

This prepares the tests for Windows.
2023-09-04 13:04:18 -07:00
Pavel Yaskevich
2a0651e8b0 [Frontend/NFC] SE-0400: Enable InitAccessors feature by default 2023-07-31 13:18:59 -07:00
Doug Gregor
6265f0c542 [SE-0395] Rename _Observation module to Observation
The review of SE-0395 is down to small details at this point that won't
affect the overall shape of the API much. Rename the model in
anticipation of that.
2023-06-30 11:01:02 -07:00
Hamish Knight
3f401fb134 [test] Require asserts for a couple of tests 2023-06-15 12:28:55 +01:00
Doug Gregor
1209ef89ec Ensure that macros within init accessors are expanded early enough
Now that we've made accessor macro expansion more lazy, ensure that
when querying for init accessors (e.g., to build a memberwise
initializer), we also expand any accessor macros that might produce an
init accessor.

This is a partial step toward the real goal, which is that
`AbstractStorageDecl::getAccessor()` should lazily expand macros if
needed.

Update the Observable macro to document that it produces an `init`
accessor.
2023-06-11 08:48:43 -07:00
Doug Gregor
eeede463fc [Test] Note that test requires observation to be built 2023-05-30 17:31:31 -07:00
Doug Gregor
548ff3a0b2 [Test] Ensure that a class using the Observable macro builds a proper interface 2023-05-25 13:59:41 -07:00