Re:Why Does Julia Work So Well?
by improbable22 on Wednesday October 21, 2020 @08:52AM
(#24847313)
It goes to `literal_pow`, one way to check is to overload this:
Base.literal_pow(::typeof(^), x::Int, ::Val{n}) where {n} =
(println("power $n"); float(x)^n)
pow = -5
2^-5 # yes
2^pow # no, hence an error
Definitely no runtime check