[swift2objc] Add integration test for restricted setters #3839
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 267 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.334
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3839"
general
weight: 0.35
liamappelbe
Description
Adds the integration test requested in the last comment on #2049.
The test covers
private(set),fileprivate(set)andinternal(set)stored properties on a class and a struct, including static properties and a property with a non-representable type. They are all wrapped as get-only properties, while the plainpublic varproperties next to them keep their setters.Two cases are not covered:
package(set), which needs a-package-namethat the test harness doesn't pass.swiftc -emit-symbol-graph(Swift 6.2) emits the declaration fragmentsvar computed: Int { get set }withaccessLevel: public, which is identical to a property with a public setter. swift2objc then generates a setter, and the wrapper fails to compile withcannot assign to property: 'computed' setter is inaccessible. I didn't see anything else in the symbol that distinguishes the two cases, so I left this out of the test rather than guess at a fix. I'm happy to file a separate issue for it if that's useful.Related Issues
Refs #2049. I've used "Refs" rather than "Fixes" because of the computed property case above.
PR Checklist
dart tool/ci.dart --alllocally and resolved all issues identified. Two tests outside this package fail on my machine and are unrelated to this change:native_toolchain_c/test/clinker/rust_test.dart(I don't haverustcinstalled) and a 30s timeout inhooks_runner/test/build_runner/build_planner_test.dart.CHANGELOG.mdfor the relevant packages. (Test only, so no entry.)