Update ObservableMacro Comment for Clarity on Struct Support #70190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this pull request?
This PR updates the comment in
ObservableMacro.swift
regarding the support of structs with the Observable macro. The original comment suggested that support for structs might be added in the future, which could potentially lead to misunderstandings among developers about the current and future capabilities of the framework.Description of Changes
The comment at line 212 in
ObservableMacro.swift
has been updated to more accurately reflect the current state of struct support. The updated comment is as follows:This change aims to provide clearer and more precise information to developers, helping them understand the present limitations and the context in which future support might be considered.
Rationale
The motivation for this change stems from discussions in the Swift community and the existing ambiguity surrounding the support of structs in the Observation framework. By clarifying the current state and potential future of struct support, this update seeks to align the comment with the ongoing technical discussions and considerations within the community. For further context, refer to the related discussion on the Swift forums: Swift Forum Discussion Link.
Resolves #70026