JuliaLang/julia
"@inferred requires a call expression" for do notation
Offen
#59.114 geöffnet am 28.07.2025
good first issue
Repository-Metriken
- Stars
- (48.709 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 20T 6h) (157 gemergte PRs in 30 T)
Beschreibung
Lambda functions work fine, while the same do-block throws an error:
julia> using Test
julia> @inferred map(x->x, [1,2])
2-element Vector{Int64}:
1
2
julia> @inferred map([1,2]) do x
x
end
ERROR: LoadError: @inferred requires a call expression