Skip to content

Commit abde2f1

Browse files
authored
Fix wrong := REPL documentation (#39975)
1 parent 1f21f2d commit abde2f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

stdlib/REPL/src/docview.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function lookup_doc(ex)
220220
if isa(ex, Symbol) && Base.isoperator(ex)
221221
str = string(ex)
222222
isdotted = startswith(str, ".")
223-
if endswith(str, "=") && Base.operator_precedence(ex) == Base.prec_assignment
223+
if endswith(str, "=") && Base.operator_precedence(ex) == Base.prec_assignment && ex !== :(:=)
224224
op = str[1:end-1]
225225
eq = isdotted ? ".=" : "="
226226
return Markdown.parse("`x $op= y` is a synonym for `x $eq x $op y`")

stdlib/REPL/test/repl.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,9 @@ end
10921092
@test occursin("identical", sprint(show, help_result("===")))
10931093
@test occursin("broadcast", sprint(show, help_result(".<=")))
10941094

1095+
# Issue 39427
1096+
@test occursin("does not exist", sprint(show, help_result(":=")))
1097+
10951098
# Issue #25930
10961099

10971100
# Brief and extended docs (issue #25930)

0 commit comments

Comments
 (0)