Commit Graph

1 Commits

Author SHA1 Message Date
Slava Pestov
68bdfa81e3 SILGen: Fix verifier error when forming keypath to subscript with resilient 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 https://github.com/swiftlang/swift/issues/79304.
2025-02-11 22:14:23 -05:00