diff --git a/src/sectors/irreps.jl b/src/sectors/irreps.jl index 0eb3ad03..04d5fdf6 100644 --- a/src/sectors/irreps.jl +++ b/src/sectors/irreps.jl @@ -334,6 +334,7 @@ function Base.length(p::CU1ProdIterator) return 2 end end +Base.eltype(::Type{CU1ProdIterator}) = CU1Irrep ⊗(a::CU1Irrep, b::CU1Irrep) = CU1ProdIterator(a, b) diff --git a/test/sectors.jl b/test/sectors.jl index a0a70458..a0702552 100644 --- a/test/sectors.jl +++ b/test/sectors.jl @@ -19,6 +19,8 @@ println("------------------------------------") @constinferred Bsymbol(s...) @constinferred Fsymbol(s..., s...) it = @constinferred s[1] ⊗ s[2] + @test eltype(it) === I + @test collect(it) isa Array{I} @constinferred ⊗(s..., s...) end @testset "Sector $Istr: Value iterator" begin