diff --git a/base/promotion.jl b/base/promotion.jl index 7faef91b7683c..98efd35b044a3 100644 --- a/base/promotion.jl +++ b/base/promotion.jl @@ -253,8 +253,8 @@ end Exponentiation operator. If `x` is a matrix, computes matrix exponentiation. -If `y` is an `Int` literal (e.g. `x^2` or `x^-3`), the Julia code -`x^y` is transformed to `x^Val{y}`, to enable compile-time +If `y` is an `Int` literal (e.g. `2` in `x^2` or `-3` in `x^-3`), the Julia code +`x^y` is transformed by the compiler to `x^Val{y}`, to enable compile-time specialization on the value of the exponent. (As a default fallback, however, `x^Val{y}` simply calls the `^(x,y)` function.)