perl6 / Pugs.hs

(ARCHIVE) Raku User's Golfing System in Haskell
84 stars 17 forks source link

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

Open coke opened 12 years ago

coke commented 12 years ago

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"