Instantiation of a subtype of an abstract type

The reason you are getting an error is that when you create an object in the repl, Julia prints it out to show what you did. In order to print an AbstractMatrix, Julia needs to know how big it is, and how to get the elements.

1 Like