Documenter.jl icon indicating copy to clipboard operation
Documenter.jl copied to clipboard

Fix `binding` for functors

Open mgkurtz opened this issue 2 years ago • 4 comments

Together with JuliaLang/julia#45367 this should fix #558.

mgkurtz avatar May 19 '22 12:05 mgkurtz

Is this fix backwards compatible with Julia versions that don't include the JuliaLang/julia/pull/45367 fix?

mortenpi avatar May 20 '22 00:05 mortenpi

Well, the new tests positively were not compatible with Julia as is. Always a nice thing, if new tests fail successfully :D

Anyway, even then this PR is still a little bit useful, as it allows to write (::Foo)(x) in an @doc. Although this notation is for now equivalent to Foo(x).

mgkurtz avatar May 20 '22 14:05 mgkurtz

The change in handling :where is, by the way, not really related. It only removes a superfluous(?) shortcut (taking two recursion steps in one) which seemed to ask for being a bug. (And it does produce an error, if one is mad enough to ask for the documentation of Int where T which is a valid Julia expression egal to Int.) Or did this special casing of :where had some other reason?

mgkurtz avatar May 20 '22 14:05 mgkurtz

I'd be happy to have the tests be version-guarded, although that would mean waiting for JuliaLang/julia#45367 to get merged.

mortenpi avatar May 20 '22 21:05 mortenpi