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
julia>@generatedfoo(x::T) where T = x
ERROR: invalid syntax; @generated must be used with a function definition
julia>@generatedfoo(x::Twhere T) = x
foo (generic function with 1 method)
julia>@inlinefoo(x::T) where T = x
foo (generic function with 1 method)
julia>@fastmathfoo(x::T) where T = x
foo (generic function with 1 method)
Is there a particular reason why the first definition is a syntactic error?
rfourquet
changed the title
Syntactic erorr in one-liner definition of generated functions with where syntax
Syntactic error in one-liner definition of generated functions with where syntax
Jun 6, 2017
Is there a particular reason why the first definition is a syntactic error?
First reported at https://discourse.julialang.org/t/one-liner-definition-of-generated-functions-with-where-syntax/3982
The text was updated successfully, but these errors were encountered: