Skip to content
Browse files

fix Exportops.pm, and unfudge S06-operator-overloading/imported-subs.t

  • Loading branch information...
1 parent a66ef9c commit 65514849a9587b929c5decae72bac52776b9a398 @moritz moritz committed Mar 2, 2012
Showing with 1 addition and 9 deletions.
  1. +0 −8 S06-operator-overloading/imported-subs.t
  2. +1 −1 packages/Exportops.pm
View
8 S06-operator-overloading/imported-subs.t
@@ -22,27 +22,19 @@ BEGIN { @*INC.push: 't/spec/packages' };
ok eval('"a" yadayada "b"'), 'infix:<yadayada> was exported';
#?rakudo skip 'nom regression'
ok eval('"a" yadayada "b" eq "a..b" or die'), '... and it works';
- #?rakudo todo "op= form doesn't work for imported operators?"
#?pugs todo
ok eval('my $a = "a"; $a yadayada= "b"; $a eq "a..b" or die'), '... and yadayada= works too';
- #?rakudo todo 'nom regression'
ok eval('¢"foo"'), 'imported Unicode prefix operator';
- #?rakudo todo 'nom regression'
ok eval('¢4 eq "4 cent" or die '), '... and it works';
- #?rakudo todo 'nom regression'
ok eval('3 ± 4'), 'infix:<±> was exported';
- #?rakudo todo 'nom regression'
#?pugs todo
ok eval('(3 ± 4).isa(Range) or die'), '... and it works';
- #?rakudo todo 'nom regression'
is eval("(NotANumber.new(:number(4)) NAN+ NotANumber.new(:number(-1))).number"), 3, "infix:<NAN+> was exported";
- #?rakudo todo 'nom regression'
is eval("(NotANumber.new(:number(4)) + NotANumber.new(:number(-1))).number"), 3, "multi infix:<+> was exported and is visible";
- #?rakudo 2 todo "op= form doesn't work for imported operators?"
#?pugs todo
is eval('my $a = NotANumber.new(:number(4)); $a NAN+= NotANumber.new(:number(-1)); $a.number;'), 3, "NAN+= works too";
is eval('my $a = NotANumber.new(:number(4)); $a += NotANumber.new(:number(-1)); $a.number;'), 3, "+= works too";
View
2 packages/Exportops.pm
@@ -9,7 +9,7 @@ sub infix:<±>($a, $b) is export(:DEFAULT) { $a - $b .. $a + $b }
# exported multi
-class NotANumber {
+class NotANumber is export {
has $.number;
}

0 comments on commit 6551484

Please sign in to comment.
Something went wrong with that request. Please try again.