Skip to content

Conversation

slavapestov
Copy link
Contributor

emitKeyPathSubscriptOperands() uses the ArgEmitter to collect index arguments, which uses ResilienceExpansion::Minimal when lowering parameter types.

For this reason, lowerKeyPathSubscriptIndexTypes() should also use ResilienceExpansion::Minimal when lowering parameter types.

Otherwise, we crash in the SIL verifier due to a loadable vs address-only mismatch, if the index type is resilient.

Fixes rdar://problem/144654366.
Fixes #79304.

…ilient index type emitKeyPathSubscriptOperands() uses the ArgEmitter to collect index arguments, which uses ResilienceExpansion::Minimal when lowering parameter types. For this reason, lowerKeyPathSubscriptIndexTypes() should also use ResilienceExpansion::Minimal when lowering parameter types. Otherwise, we crash in the SIL verifier due to a loadable vs address-only mismatch, if the index type is resilient. Fixes rdar://problem/144654366. Fixes swiftlang#79304.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit c3a33c6 into swiftlang:main Feb 12, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant