Skip to content

Fix IndirectOptional wrappedValue setter#802

Merged
Kyle-Ye merged 2 commits intomainfrom
k-branch-2
Mar 1, 2026
Merged

Fix IndirectOptional wrappedValue setter#802
Kyle-Ye merged 2 commits intomainfrom
k-branch-2

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Mar 1, 2026

Summary

  • Add missing wrappedValue setter to IndirectOptional, enabling mutation through the computed property
  • Add test cases for IndirectOptional covering init variants, getter/setter, and Equatable/Hashable conformance

Test plan

  • wrappedValue setter: none→some, some→some, some→none transitions
  • wrappedValue getter for .some and .none
  • All init variants (value, nilLiteral, wrappedValue)
  • Equatable and Hashable conformance

Kyle-Ye added 2 commits March 1, 2026 22:17
Cover wrappedValue getter/setter, init variants, and
Equatable/Hashable conformance.
@github-actions github-actions bot added bug Something isn't working test Test related issue labels Mar 1, 2026
@augmentcode
Copy link

augmentcode bot commented Mar 1, 2026

🤖 Augment PR Summary

Summary: This PR fixes mutation support for IndirectOptional by adding a missing setter to its wrappedValue computed property.

Changes:

  • Converted `IndirectOptional.wrappedValue` from a read-only computed property into a get/set property
  • Setter updates `self` to `.some` or `.none` based on the assigned `Optional` value
  • Added a dedicated test suite for `IndirectOptional` covering init variants and getter/setter transitions
  • Added conformance coverage tests for `Equatable` and `Hashable` behavior

Technical Notes: The new setter enables mutation via wrappedValue (including none↔some transitions) which previously was not possible through the computed property.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 13.72%. Comparing base (415b75e) to head (42c8f75).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #802      +/-   ##
==========================================
+ Coverage   13.67%   13.72%   +0.04%     
==========================================
  Files         622      622              
  Lines       37149    37153       +4     
==========================================
+ Hits         5081     5099      +18     
+ Misses      32068    32054      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 441a868 into main Mar 1, 2026
10 checks passed
@Kyle-Ye Kyle-Ye deleted the k-branch-2 branch March 1, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working test Test related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant