[Maybe bug] `Invalid @var syntax` in help mode


#1

努力填坑 Julia Cheat Sheet 时发现的疑似 bug

可复现版本:v0.64/v0.7/v1.0/v1.02

# 下面那个符号是 Set Difference: \setminus
# 理论上应该和 setdiff() 等价
?∖
help?> ∖
ERROR: LoadError: Invalid @var syntax `invalid character "∖"`.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] splitexpr(::Any) at .\docs\bindings.jl:28
 [3] bindingexpr(::Any) at .\docs\bindings.jl:17
 [4] lookup_doc(::Expr) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\docview.jl:137
 [5] docm(::LineNumberNode, ::Module, ::Any) at .\docs\Docs.jl:501
 [6] @doc(::LineNumberNode, ::Module, ::Expr, ::Vararg{Expr,N} where N) at .\boot.jl:451
in expression starting at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\docview.jl:301

julia> Char('∖')
'∖': Unicode U+2216 (category Sm: Symbol, math)

找不到符号定义很正常,不显示 can be typed by 也行,报错就有问题了。


#2

bug,请报告一个issue


#3

已发 issue ?\setminus <tab> raise an error “Invalid @var syntax” · Issue #30506 · JuliaLang/julia