[SR-9790] [AD] [Lexer] Disambiguate between @differentiable decl attribute and type attribute #52215
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
swift for tensorflow
Additional Detail from JIRA
md5: 211ab4b11abf2e3ad7e556a3dbabfcd8
relates to:
Issue Description:
The `@autodiff` attribute was never designed to exist – it existed because the lexer can only lex `@differentiable` to one token kind without extra lookahead. We should fix that.
Both the type attribute and the decl attribute can be followed by a parenthesis and an identifier.
Decl attributes: `@differentiable(wrt: x)`, `@differentiable(where T : FloatingPoint)`
Type attributes: `@differentiable (T) -> U`, `@differentiable SomeTypeAlias`
The text was updated successfully, but these errors were encountered: