mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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).