Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

Null PMC access in find_method() for infix:<+> #1237

Closed p6rt closed 15 years ago

p6rt commented 15 years ago

Migrated from rt.perl.org#68664 (status was 'resolved')

Searchable as RT68664$

p6rt commented 15 years ago

From vetinari@ankh-morp.org

$ ./perl6 -e 'class A {   has $.a is rw;   method add (A $b) { $.a ~ $b.a } } multi sub infix​:\<+> (A $a, A $b) { $a.add($b) }; my A $a .= new(a=>"foo"); my A $b .= new(a=>"bar"); say $a.a ~ $b.a; say $a + $b' foobar Null PMC access in find_method()

p6rt commented 15 years ago

From @pmichaud

Now fixed in f351f60​:

$ cat x class A {   has $.a is rw;   method add(A $b) { $.a ~ $b.a } }

multi sub infix​:\<+>(A $a, A $b) { $a.add($b) };

my A $a .= new(a=>'foo'); my A $b .= new(a=>'bar');

say $a.a ~ $b.a; say $a + $b; $ ./perl6 x foobar foobar $

Assigning to moritz++ so that we can get a spectest for infix​:\<+> overloading.

Thanks!

Pm

p6rt commented 15 years ago

The RT System itself - Status changed from 'new' to 'open'

p6rt commented 15 years ago

From @moritz

Now tested in t/spec/S06-operator-overloading/sub.t.

Cheers, Moritz

p6rt commented 15 years ago

@moritz - Status changed from 'open' to 'resolved'