JuliaLang/julia

`@. vec = vec +1` gives unhelpful error

Open

#49,968 创建于 2023年5月26日

在 GitHub 查看
 (9 评论) (1 反应) (0 负责人)Julia (5,773 fork)batch import
good first issue

仓库指标

Star
 (48,709 star)
PR 合并指标
 (平均合并 20天 6小时) (30 天内合并 157 个 PR)

描述

julia> vec = [1, 2, 3]
3-element Vector{Int64}:
 1
 2
 3

julia> @. vec = vec + 1
3-element Vector{Int64}:
 2
 3
 4

julia> @. vec = vec +1
ERROR: LoadError: MethodError: no method matching var"@__dot__"(::LineNumberNode, ::Module, ::Expr, ::Int64)
Closest candidates are:
  var"@__dot__"(::LineNumberNode, ::Module, ::Any) at broadcast.jl:1276
in expression starting at REPL[11]:1

Originally posted by @draftman9 in https://github.com/JuliaLang/julia/issues/49676#issuecomment-1538702202

贡献者指南