Files
swift-mirror/test/AutoDiff/Sema
Victor Guerra f81aba74bb [AutoDiff][SR-13152] Better diagnostic for static decl modifier mismatch. (#36128)
Improved diagnostic for when the registered derivative function and
the function it derivates (the original) differ in terms of
`static` declaration modifier usage. Suggesting as well a fix-it,
to either remove or add the `static` keyword.

The registered derivative needs to be marked as `static` in two cases:

1. When the original function is a constructor.
2. When the original function is static as well.

When the original function is an instance method, the registered derivative must be as well.

Resolves [SR-13152](https://bugs.swift.org/browse/SR-13152).
2021-03-03 01:53:22 -08:00
..