Closed
Description
I expected the following code
mutable struct node_t
prev::node_t
next::node_t
end
x = Vector{node_t}(undef,3);
show(x) # StackOverflowError
to produce the output
node_t[#undef, #undef, #undef]
but instead it recursed forever until the stack was full.
Bonus info: Adding an unused(?) inner constructor:
mutable struct node_t
prev::node_t
next::node_t
node_t() = new() # not used anywhere??
end
x = Vector{node_t}(undef,3);
show(x)
makes it behave as expected.
Metadata
Metadata
Assignees
Labels
No labels