swift
a077071d - [AutoDiff] Relax `@differentiable` requirement for protocol witnesses. (#29771)

Commit
5 years ago
[AutoDiff] Relax `@differentiable` requirement for protocol witnesses. (#29771) Previously, all witnesses of a `@differentiable` protocol requirement were required to have the same attribute (or one with superset parameter indices). However, this leads to many annotations on witnesses and is not ideal for usability. `@differentiable` attributes are really only significant on public witnesses, so that they are clearly `@differentiable` at a glance (in source code, interface files, and API documentation), without looking through protocol conformance hierarchies. Now, only *public* witnesses of `@differentiable` protocol requirements are required to have the same attribute (or one with superset parameter indices). For less-visible witnesses, an implicit `@differentiable` attribute is created with the same configuration as the requirement's. Resolves TF-1117.
Author
Parents
Loading