mirror of
https://github.com/apple/swift.git
synced 2025-12-25 12:15:36 +01:00
This method was only ever called with non-generic witnesses, because it assumed the substitutions stored in the witness would always be derived from the conforming type. There were two cases where this wasn't the case though: 1) If the witness is itself generic 2) The witness was defined in a protocol extension and the conforming type is a non-final class In all cases, the SubstitutionMap stored in a Witness always uses the 'synthetic environment'. In some cases, the 'synthetic environment' is the generic environment of the witness. But in 1) and 2) it was different. While 1) never occurred because we never used this method to look up witnesses for generic requirements, 2) could happen.
56 KiB
56 KiB