Skip to content

Conversation

egorzhdan
Copy link
Contributor

@egorzhdan egorzhdan commented Aug 19, 2025

This fixes a runtime crash when a `weak` reference to a C++ foreign reference type is used.

Instead of a runtime crash, Swift would now emit a compiler error saying that `weak` keyword is incompatible with foreign reference types.

rdar://124040825 / resolves swiftlang#83080
(cherry picked from commit 9abadf5)
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Aug 19, 2025
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@egorzhdan egorzhdan marked this pull request as ready for review August 19, 2025 11:25
@egorzhdan egorzhdan requested a review from a team as a code owner August 19, 2025 11:25
@egorzhdan egorzhdan merged commit f9ede2a into swiftlang:release/6.2 Aug 19, 2025
5 checks passed
@egorzhdan egorzhdan deleted the egorzhdan/6.2-weak-references branch August 19, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants