Type assertion for parametric constructors behaves strangely

I believe OP’s question was more about why the constructor of a parametric (composite) type can’t have a different signature of type parameters.

In other words, can a type A{T<:Real, N1} have a constructor A{N2}(args...) where N2 corresponds to N1 even though it’s in the same position as T?

If my understanding is correct, this is IMO a more relevant issues where I had the similar discussions with core developers a few years ago.

1 Like