No such method in class: "&bless" #19

Open
coke opened this Issue Jul 17, 2012 · 0 comments

Comments

Projects
None yet
1 participant

coke commented Jul 17, 2012

The following code (cribbed from t/spec/S32-trig/cos.t) fails:

class NotComplex is Cool {
    has $.value;

    multi method new(Complex $value is copy) {
        self.bless(*, :$value);
    }
}

my $a = NotComplex.new(0 + 2i);
say $a;

with:

*** No such method in class NotComplex: "&bless"

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