Array attributes silently don't work #12

moritz opened this Issue Jan 29, 2011 · 2 comments


None yet
3 participants

moritz commented Jan 29, 2011

class A {
    has @!x;
    method pushx($a) {
        pir::push(@!x, $a);
        say(pir::join('|', @!x));

# output: an empty line. Should be 42\n, IMHO

That's the same both in master and nom branch. Needs fixing :-)


jnthn commented Jan 29, 2011

Also needs fixing in nqpclr.


ghost commented Feb 2, 2011

This will ultimately depend on whether the underlying object model automatically binds @!x of self to an array object of some sort when a new instance is created (or first accessed). NQP cannot really force it to happen as part of scope initialization, like it can for local variables.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment