How to step into the function which defines [ ]?


#1

I’m trying to take a look of the function which defines the syntax of the square brackets and the semi-colon. Apparently, I’m doing something very wrong:

julia> @enter [1;2]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call

Can anyone let me know what is the correct way to enter the right piece of the code? Thanks!


#2

Does @enter temp = [1,2] work?


#3

Unfortunately not:

julia> @enter temp = [1;2]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call

julia> @enter temp = [1,2]
ERROR: AssertionError: isa(arg,Expr) && arg.head == :call

#4

This might help:

using Gallium
f(x) = [x,x+1]
@enter f(1)

#5

Aha! Brilliant idea! Thanks for the workaround. It works!