I came across this old thread on literal_pow
where the suggestion to introspect code is to use
julia> @eval @which $(expand(:(1^2)))
literal_pow(::Base.#^, x::Union{Complex{#s37} where #s37<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, Float32, Float64, Int16, Int32, Int64, Int8, Rational{#s23} where #s23<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, UInt16, UInt32, UInt64, UInt8}, ::Type{Val{2}}) in Base at intfuncs.jl:218
However expand
is not defined in Julia 1.2. Is there an equivalent function?