swift
6403675b - [AutoDiff] Fix derivative function protocol witness SILGen.

Commit
4 years ago
[AutoDiff] Fix derivative function protocol witness SILGen. Fix SILGen verification failure for derivative function protocol witness thunks. In `SILGenFunction::emitProtocolWitness`, `witnessSubs` (the witness substitution map) does not have the same generic signature as `witnessFnRef` (the result of `getWitnessFunctionRef`), which has additional differentiability requirements. Update `witnessSubs` to have the same generic signature as the witness callee. Resolves SR-13229.
References
Author
Committer
Parents
  • lib/SILGen
    • File
      SILGenPoly.cpp
  • test/AutoDiff/compiler_crashers_fixed
    • File
      sr13229-silgen-derivative-witness-thunk-verification-failure.swift