Skip to content

Commit

Permalink
Allow Array:: to be used as a top level namespace in modules
Browse files Browse the repository at this point in the history
This basically moves the dim2role lookup from compile time to run time.
For some reason, having this lookup at compile time, caused Array:: to
be somehow special wrt serialization contexts.

This removes the error:
===SORRY!===
Object does not exist in serialization context
  • Loading branch information
lizmat committed Jul 24, 2018
1 parent 9e75271 commit a71e370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ShapedNArray.pm6
@@ -1,6 +1,6 @@
# this is actually part of the Array class

constant dim2role :=
my \dim2role :=
nqp::list(ShapedArray,Shaped1Array,Shaped2Array,Shaped3Array);

sub set-shape(\base, \shape) is raw {
Expand Down

0 comments on commit a71e370

Please sign in to comment.