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>@doc"A function"f() =3
f (generic function with 1 method)
julia>@doc f
A function
julia>@doc"An inlined function"@inlineg() =4
(anonymous function)
julia>g()
ERROR: g not defined
julia>@doc g
ERROR: g not defined
julia>@inlineh() =6
h (generic function with 1 method)
julia>h()
6
The text was updated successfully, but these errors were encountered:
I know how to fix this for macros with one or more arguments, but how do you propose the results of zero-argument macros be documented, syntax-wise? Currently @doc "something" @m documents @m itself, not the result of @m().
(@mschauer's solution doesn't work anymore, because this inconsistency between the two notations has been fixed.
This works but is a bit awkward I think: @doc "an inlined funcion" (() -> @inline global g() = 4)(), or @doc "an inlined funcion" (0; @inline g() = 4),
or anything that hides the macro-call into a expression that returns its value.
The text was updated successfully, but these errors were encountered: