Skip to content
Go to file
Cannot retrieve contributors at this time
23 lines (15 sloc) 497 Bytes
use v6;
use Test;
plan 2;
# L<S13/"Fallbacks"/"is also generated for you (unless you define it yourself).">
class Base {has $.value is rw;}
class Exponent {has $.value is rw;}
multi sub infix:<+> (Base $b, Exponent $e) is deep {$b.value ** $e.value}
my $base =;
my $exp =;
$base.value = 2;
$exp.value = 5;
is($base + $exp, 32, 'defining infix:<+> works');
$base += $exp;
is($base, 32, 'is deep generates infix:<+=> on infix:<+>');
# vim: expandtab shiftwidth=4
You can’t perform that action at this time.