Commit Graph

2 Commits

Author SHA1 Message Date
Slava Pestov
38d188b6b9 Sema: Bake in the old broken behavior for protocol overrides
To avoid breaking the ABI of the standard library and possibly other
modules, we can't actually enable the new accurate logic for checking
protocol requirement overrides after all.

Just skip the check if the protocol requirement is generic to get
back the old behavior.
2022-03-02 15:46:58 -05:00
Slava Pestov
345185f32d Sema: Fix isOverrideBasedOnType() to check protocol generic signatures
This avoids feeding invalid type parameters to the Requirement Machine
when a protocol requirement looks similar to a protocol requirement in
the inherited protocol but has an incompatible type.

Fixes https://bugs.swift.org/browse/SR-15826 / rdar://problem/89641535.
2022-03-02 14:18:15 -05:00