mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This likely affects other things too, but literals are where it appears most. Previously, the mid-solving literal types like Array<$T0> were just checked for whether they conformed to the protocol, without acknowledging that this might introduce requirements on $T0, instead the conditional requirements were checked against $T0, and so failed (there's no reason that $T0 should satisfy the requirements at all, it's a recently-constructed transient type variable). Instead, capture the requirements and add them as constraints to the type variable. Fixes https://bugs.swift.org/browse/SR-7192 and rdar://problem/38461036 and improves https://bugs.swift.org/browse/SR-6941.
194 KiB
194 KiB