You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require @derivative functions to have the same access level as their referenced original declaration.
One exception: @derivative functions for a public function can be either public or internal and @usableFromInline.
Same rules should apply to @transpose attribute.
Anonymous func declarations (SR-12003) enable public @derivative functions without publicly exposing the derivative function:
publicfunc bar(_ x:Float)->Float{ x }// Publicly registered derivative. Derivative function itself is not exposed, however.@derivative(of: bar)publicfunc _(_ x:Float)->(value:Float, differential:(Float)->Float){(x,{ dx in dx })}// Publicly registered transpose. Transpose function itself is not exposed, however.@transpose(of: bar)publicfunc _(_ v:Float)->Float{ v }
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 0dbde34bbd94cb985766a69c54a30d86
Parent-Task:
blocks:
@usableFromInline
derivative but non-@usableFromInline
original functionrelates to:
func
declarationsIssue Description:
Require
@derivative
functions to have the same access level as their referenced original declaration.One exception:
@derivative
functions for a public function can be either public or internal and@usableFromInline
.Same rules should apply to
@transpose
attribute.Anonymous
func
declarations (SR-12003) enable public@derivative
functions without publicly exposing the derivative function:The text was updated successfully, but these errors were encountered: