I have a function that I can’t change and it expects type
function some_function(some_parameter::ExpectedType) .... some implementation .... end
I want to pass my object of type
I decided to inherit
struct OtherType <: ExpectedType end
But I’m getting an error:
ERROR: invalid subtyping in definition of OtherType
- Is it possible to inherit from non-abst types?
- How can I get the functionality I need?
- It is not possible to inherit from non-abstract type.
- What I would typically do is writing a constructor for
OtherTypeas argument and then call