I have an abstract parent type PrimitiveBlock
from package Yao.jl
In another package QuAlgorithmZoo.jl
that depend on Yao.jl
I defined a new type
struct QFTBlock{N} <: PrimitiveBlock{N,ComplexF64} end
Now I am using QuAlgorithmZoo
like
using Yao
using Yao.Blocks
using QuAlgorithmZoo: QFTBlock
println(supertype(QFTBlock))
It will print Yao.Blocks.PrimitiveBlock{N,Complex{Float64}} where N
just as expected.
But!
QFTBlock <: Yao.Blocks.PrimitiveBlock
will return false! why?
Note:
- appear in both julia0.7 and julia1.0
- I can not repeat this bug on another laptop.