Skip to content

Commit

Permalink
fix #27832, wrong kind of quoting in bootstrap doc system (#27851)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored and Keno committed Jun 29, 2018
1 parent 2a38fef commit ba31a93
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/docs/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy_iterpolate(s::AbstractString) = Expr(:call, Core.svec, s)
lazy_iterpolate(@nospecialize x) = isexpr(x, :string) ? Expr(:call, Core.svec, x.args...) : x

function docm(source::LineNumberNode, mod::Module, str, x)
out = Expr(:call, doc!, QuoteNode(source), mod, lazy_iterpolate(str), Expr(:quote, x))
out = Expr(:call, doc!, QuoteNode(source), mod, lazy_iterpolate(str), QuoteNode(x))
if isexpr(x, :module)
out = Expr(:toplevel, out, x)
elseif isexpr(x, :call)
Expand Down
18 changes: 18 additions & 0 deletions test/docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1120,3 +1120,21 @@ struct A_20087 end
(a::A_20087)() = a

@test docstrings_equal(@doc(A_20087()), doc"a")

# issue #27832

_last_atdoc = Core.atdoc
Core.atdoc!(Core.Compiler.CoreDocs.docm) # test bootstrap doc system

"""
"""
module M27832
macro foo(x)
repr(x)
end
for fn in (:isdone,)
global xs = @foo $fn
end
end
@test M27832.xs == ":(\$(Expr(:\$, :fn)))"
Core.atdoc!(_last_atdoc)

2 comments on commit ba31a93

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.