Files
swift-mirror/validation-test/compiler_crashers_2_fixed
Slava Pestov 7a8a56254a AST: Fix substitution map composition edge case
Adding `T == Int` to

    G1 := <T where T: Equatable>

gives us

    G2 := <T where T == Int>

which means that if I have this substitution map for G2:

    S2 := { Int }

then `SubstitutionMap::get(G1, S2)` should give me this substitution map
for G1:

    S2 := { Int, [Int: Equatable] }

But it didn't, instead returning a substitution map with an invalid
conformance.

The problem is that local conformance lookup alone cannot recover
`[Int: Equatable]` in this case, because there is no "concrete
conformance requirement" `[T == Int: Equatable]` recorded anywhere
in G2.

This is of course a legacy of the GenericSignatureBuilder. It would have
been better to not drop conformance requirements made concrete. But oh
well.

Fixes https://github.com/swiftlang/swift/issues/74465
Fixes rdar://130404629.
2024-07-01 14:15:41 -04:00
..
2021-02-23 14:24:54 -08:00
2022-07-15 13:47:24 -07:00