Skip to content

Fix Swift 6.2 weak mutability warning in Binder#2677

Merged
freak4pc merged 1 commit intoReactiveX:mainfrom
kirillyakimovich:ky/support-swift-6-2
Jan 21, 2026
Merged

Fix Swift 6.2 weak mutability warning in Binder#2677
freak4pc merged 1 commit intoReactiveX:mainfrom
kirillyakimovich:ky/support-swift-6-2

Conversation

@kirillyakimovich
Copy link
Copy Markdown
Contributor

Introduction of weak let additionally added new checks, so the existing pattern warns that weakTarget will never have new value assigned by programmer.

Switching to capture list to get rid of the warning.

Redacted diagnostics message:

..RxSwift/Binder.swift:29:18: weak variable 'weakTarget' was never mutated; consider changing to 'let' constant [#�]8;;https://docs.swift.org/compiler/documentation/diagnostics/weak-mutability�\WeakMutability�]8;;�\]

Link is broken, and not able to find related article (yet?).

@freak4pc freak4pc force-pushed the ky/support-swift-6-2 branch 3 times, most recently from 1d5421f to 743bc8f Compare January 21, 2026 11:30
@freak4pc freak4pc force-pushed the ky/support-swift-6-2 branch from 743bc8f to 232c942 Compare January 21, 2026 11:39
@freak4pc freak4pc merged commit d560d3e into ReactiveX:main Jan 21, 2026
10 checks passed
@freak4pc
Copy link
Copy Markdown
Member

Thank you!

freak4pc added a commit to isaac-weisberg/RxSwift that referenced this pull request Jan 21, 2026
* main:
  Remove legacy canImport(_Concurrency) checks
  feat: Enable Swift Concurrency for Linux (ReactiveX#2660)
  Android support in Package.swift and CI testing (ReactiveX#2663)
  VirtualTimeScheduler - fix typo (ReactiveX#2671)
  Fix typo: `MutlicastType` -> `MulticastType` (ReactiveX#2669)
  Fix Swift 6.2 weak mutability warning in Binder (ReactiveX#2677)
  Update README.md (ReactiveX#2675)
  Unify version to xcconfig
  Update docs
  Deprecate CocoaPods
  Fix tests
  Format cleanup
  Update tooling
  Upgrade Xcode 26
  Fix race conditions in PrimitiveSequence+Concurrency (ReactiveX#2641)
  Signing updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants