-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
Julia 1.1.0 (2019-01-21) on Windows 10 x64
Debugger v0.2.2
Crayons v4.0.0
DocStringExtensions v0.7.0
Highlights v0.3.1
Minimal example:
m=[i + j + k for i=1:3, j=1:4, k=1:5]
using Debugger
@enter m[:,1]
Output:
ERROR: MethodError: objects of type Array{Int64,3} are not callable
Use square brackets [] for indexing an Array.
Stacktrace:
[1] #prepare_call#14(::Bool, ::Function, ::Any, ::Array{Any,1}) at C:\Users\lmorton\.julia\packages\JuliaInterpreter\8bMSs\src\construct.jl:216
[2] (::getfield(JuliaInterpreter, Symbol("#kw##prepare_call")))(::NamedTuple{(:enter_generated,),Tuple{Bool}}, ::typeof(JuliaInterpreter.prepare_call), ::Array{Int64,3}, ::Array{Any,1}) at .\none:0
[3] #determine_method_for_expr#21(::Bool, ::Function, ::Expr) at C:\Users\lmorton\.julia\packages\JuliaInterpreter\8bMSs\src\construct.jl:467
[4] #determine_method_for_expr at .\none:0 [inlined]
[5] #enter_call_expr#22(::Bool, ::Function, ::Expr) at C:\Users\lmorton\.julia\packages\JuliaInterpreter\8bMSs\src\construct.jl:507
[6] enter_call_expr(::Expr) at C:\Users\lmorton\.julia\packages\JuliaInterpreter\8bMSs\src\construct.jl:507
[7] top-level scope at C:\Users\lmorton\.julia\packages\Debugger\JwW1u\src\Debugger.jl:88
For reference, this is what happens if you do not use @run:
julia> m[:,1]
ERROR: BoundsError: attempt to access 3×4×5 Array{Int64,3} at index [Base.Slice(Base.OneTo(3)), 1]
Stacktrace:
[1] throw_boundserror(::Array{Int64,3}, ::Tuple{Base.Slice{Base.OneTo{Int64}},Int64}) at .\abstractarray.jl:484
[2] checkbounds at .\abstractarray.jl:449 [inlined]
[3] _getindex at .\multidimensional.jl:641 [inlined]
[4] getindex(::Array{Int64,3}, ::Function, ::Int64) at .\abstractarray.jl:927
[5] top-level scope at none:0
Metadata
Metadata
Assignees
Labels
No labels