@@ -11,7 +11,12 @@ function TO.tensoralloc(
1111 A = storagetype (TT)
1212 dim = fusionblockstructure (structure). totaldim
1313 data = TO. tensoralloc (A, dim, istemp, allocator)
14- TT′ = tensormaptype (spacetype (structure), numout (structure), numin (structure), typeof (data))
14+
15+ # the following doesn't work since data isn't actually restricted to <: A
16+ # so hardcode type instead
17+ # TT′ = tensormaptype(spacetype(structure), numout(structure), numin(structure), typeof(data))
18+ TT′ = TensorMap{scalartype (data), spacetype (structure), numout (structure), numin (structure), typeof (data)}
19+
1520 return TT′ (data, structure)
1621end
1722
@@ -156,7 +161,7 @@ function TO.tensorcontract_type(
156161 spacetype (A) == spacetype (B) || throw (SpaceMismatch (" incompatible space types" ))
157162 I = sectortype (A)
158163 TC′ = isreal (I) ? TC : complex (TC)
159- M = pomote_storagetype (similarstoragetype (A, TC′), similarstoragetype (B, TC′))
164+ M = promote_storagetype (similarstoragetype (A, TC′), similarstoragetype (B, TC′))
160165 return tensormaptype (spacetype (A), N₁, N₂, M)
161166end
162167
0 commit comments