Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests for RT #127660.
  • Loading branch information
jnthn committed Mar 9, 2016
1 parent a20b3a4 commit cf3374d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion S12-methods/submethods.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 27;
plan 29;

=begin pod
Expand Down Expand Up @@ -121,4 +121,12 @@ Basic submethod tests. See L<S12/"Submethods">
is( $C2.double_value, 200, '... or value passed in' );
}

# RT #127660
{
my class M { method Bool { True } }
is M || 42, M, 'Bool method in class is used in boolificiation';
my class SM { submethod Bool { True } }
is SM || 42, SM, 'Bool submethod in class is used in boolificiation';
}

# vim: ft=perl6
10 changes: 9 additions & 1 deletion S14-roles/mixin.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 48;
plan 50;

# L<S14/Run-time Mixins/>

Expand Down Expand Up @@ -221,4 +221,12 @@ throws-like 'True but (1, 1)', Exception, gist => { $^g ~~ /'Int'/ && $g ~~ /res
ok (Any but role { }) !=== (Any but role { }), 'anonymous roles are distinct';
}

# RT #127660
{
my $m = Any but role { method Bool { True } }
is $m || 42, $m, 'method Bool in mixin is used';
my $sm = Any but role { submethod Bool { True } }
is $sm || 42, $sm, 'submethod Bool in mixin is used';
}

# vim: syn=perl6

0 comments on commit cf3374d

Please sign in to comment.