Why is B
ok and BB
not? How do I get BB
to work?
abstract type AbsA{F<:AbstractFloat} end
struct A{F} <: AbsA{F}
data::F
end
a = A(9.) # OK
abstract type AbsB{F<:AbstractFloat} end
struct B{F, TA<:AbsA{F}} <: AbsB{F}
x::TA
y::F
end
b = B(A(9.), 1.) # OK
struct BB{TA<:AbsA{F}, F} <: AbsB{F}
x::TA
y::F
end
# Throws error UndefVarError: F not defined