Skip to content

Commit 8682063

Browse files
committed
disable lts type stability tests
1 parent c30fc3e commit 8682063

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

test/operators/mpohamiltonian.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ end
255255
mps1 = FiniteMPS(physicalspace(H1), oneunit(V))
256256

257257
for T in (Float64, ComplexF64)
258-
H2 = @testinferred adapt(Vector{T}, H1)
258+
H2 = if VERSION <= v"1.12"
259+
adapt(Vector{T}, H1)
260+
else
261+
@testinferred adapt(Vector{T}, H1)
262+
end
259263
@test H2 isa FiniteMPOHamiltonian
260264
@test scalartype(H2) == T
261265
@test storagetype(H2) == Vector{T}
@@ -265,7 +269,12 @@ end
265269
H3 = InfiniteMPOHamiltonian(fill(V, L), (1, 2) => h, (1, 3) => h, (1, 4) => h)
266270
mps2 = InfiniteMPS(physicalspace(H3), [oneunit(V)])
267271
for T in (Float64, ComplexF64)
268-
H4 = @testinferred adapt(Vector{T}, H3)
272+
H4 = if VERSION <= v"1.12"
273+
# this is type unstable for LTS for some reason
274+
adapt(Vector{T}, H3)
275+
else
276+
@testinferred adapt(Vector{T}, H3)
277+
end
269278
@test H4 isa InfiniteMPOHamiltonian
270279
@test scalartype(H4) == T
271280
@test storagetype(H4) == Vector{T}

0 commit comments

Comments
 (0)