Having a UnionAll and another type I would like to check if the other was constructed by filling the parameters of the UnionAll:
struct A{T} end
const C1 = A{Int}
using Test
@test concretizationof(C1, A) == true
@test concretizationof(C1, Number) == false
@test concretizationof(A, A) == false
A rudimentary implementation:
concretizationof(c, a) = isconcretetype(c) && typeof(a) == UnionAll && c.name == a.body.name
Is there a better alternative? Better means e.g. without using implementation details, and not throwing for (Vector{Int}, Array)
.