@@ -134,6 +134,10 @@ using StaticArrays, Test, LinearAlgebra
134134 msr = reshape (ms, SOneTo (4 ))
135135 msr[2 ] = 10
136136 @test ms == SA[1 2 ; 10 4 ]
137+
138+ s = SA[1 ,2 ];
139+ s2 = @inferred reshape (s, axes (s,1 ), axes (s,2 ))
140+ @test s2 isa StaticArray
137141 end
138142
139143 @testset " copy" begin
@@ -200,7 +204,7 @@ using StaticArrays, Test, LinearAlgebra
200204 @test @inferred (convert (AbstractArray{Float64}, diag)) isa Diagonal{Float64,SVector{2 ,Float64}}
201205 @test convert (AbstractArray{Float64}, diag) == diag
202206 # The following cases currently convert the SMatrix into an MMatrix, because
203- # the constructor in Base invokes `similar`, rather than `convert`, on the static
207+ # the constructor in Base invokes `similar`, rather than `convert`, on the static
204208 # array. This was fixed in https://github.com/JuliaLang/julia/pull/40831; so should
205209 # work from Julia v1.8.0-DEV.55
206210 trans = Transpose (SVector (1 ,2 ))
297301 @test Base. rest (x) == x
298302 a, b... = x
299303 @test b == SA[2 , 3 ]
300-
304+
301305 x = SA[1 2 ; 3 4 ]
302306 @test Base. rest (x) == vec (x)
303307 a, b... = x
@@ -306,14 +310,14 @@ end
306310 a, b... = SA[1 ]
307311 @test b == []
308312 @test b isa SVector{0 }
309-
313+
310314 for (Vec, Mat) in [(MVector, MMatrix), (SizedVector, SizedMatrix)]
311315 x = Vec (1 , 2 , 3 )
312316 @test Base. rest (x) == x
313317 @test pointer (Base. rest (x)) != pointer (x)
314318 a, b... = x
315319 @test b == Vec (2 , 3 )
316-
320+
317321 x = Mat {2,2} (1 , 2 , 3 , 4 )
318322 @test Base. rest (x) == vec (x)
319323 @test pointer (Base. rest (x)) != pointer (x)
0 commit comments