You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionreinterpret(::typeof(reshape), ::Type{T}, a::A) where {T,S,A<:AbstractArray{S}}
83
84
functionthrowintmult(S::Type, T::Type)
84
85
@noinline
85
-
throw(ArgumentError("`reinterpret(reshape, T, a)` requires that one of `sizeof(T)` (got $(sizeof(T))) and `sizeof(eltype(a))` (got $(sizeof(S))) be an integer multiple of the other"))
86
+
throw(ArgumentError(LazyString("`reinterpret(reshape, T, a)` requires that one of `sizeof(T)` (got ",
87
+
sizeof(T), ") and `sizeof(eltype(a))` (got ", sizeof(S), ") be an integer multiple of the other")))
86
88
end
87
89
functionthrowsize1(a::AbstractArray, T::Type)
88
90
@noinline
89
-
throw(ArgumentError("`reinterpret(reshape, $T, a)` where `eltype(a)` is $(eltype(a)) requires that `axes(a, 1)` (got $(axes(a, 1))) be equal to 1:$(sizeof(T) ÷sizeof(eltype(a))) (from the ratio of element sizes)"))
91
+
throw(ArgumentError(LazyString("`reinterpret(reshape, ", T, ", a)` where `eltype(a)` is ", eltype(a),
92
+
" requires that `axes(a, 1)` (got ", axes(a, 1), ") be equal to 1:",
93
+
sizeof(T) ÷sizeof(eltype(a)), " (from the ratio of element sizes)")))
90
94
end
91
95
functionthrowfromsingleton(S, T)
92
96
@noinline
93
-
throw(ArgumentError("`reinterpret(reshape, $T, a)` where `eltype(a)` is $S requires that $T be a singleton type, since $S is one"))
97
+
throw(ArgumentError(LazyString("`reinterpret(reshape, ", T, ", a)` where `eltype(a)` is ", S,
98
+
" requires that ", T, " be a singleton type, since ", S, " is one")))
94
99
end
95
100
isbitstype(T) ||throwbits(S, T, T)
96
101
isbitstype(S) ||throwbits(S, T, S)
@@ -804,8 +809,8 @@ end
804
809
inpackedsize =packedsize(In)
805
810
outpackedsize =packedsize(Out)
806
811
inpackedsize == outpackedsize ||
807
-
throw(ArgumentError("Packed sizes of types $Outand $In do not match; got $outpackedsize \
808
-
and $inpackedsize, respectively."))
812
+
throw(ArgumentError(LazyString("Packed sizes of types ", Out, "and ", In,
813
+
" do not match; got ", outpackedsize, "and ", inpackedsize, ", respectively.")))
0 commit comments