This is an automatically generated mail to inform you that tests are now available in t/spec/S14-roles/parameterized-type.t
commit f1fa89ed11f37183f0126ed779a828fe151303a4 Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Sat Aug 1 04:30:24 2009 +0000 [t/spec] Tests for RT #68074 git-svn-id: http://svn.pugscode.org/p...@27827 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S14-roles/parameterized-type.t b/t/spec/S14-roles/parameterized-type.t index 1b3c4d2..5eeff7f 100644 --- a/t/spec/S14-roles/parameterized-type.t +++ b/t/spec/S14-roles/parameterized-type.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 24; +plan 28; =begin pod @@ -56,6 +56,31 @@ dies_ok { C4.new.call_fail }, 'roles being used as type constraints inside is R2[C3].new.call_test, 'ok', 'classes being used as type constraints inside roles work'; dies_ok { R2[C3].new.call_fail }, 'classes being used as type constraints inside roles work'; +#?rakudo skip 'RT #68074' +{ + role A[Int $x where { $x % 2 == 0 }] { + method s { 'even' } + } + role A[Int $x where { $x % 2 == 1 }] { + method s { 'odd' } + } + + class RT68074odd does A[5] {} + + my $a; + lives_ok { $a = RT68074odd.new.s }, + 'can call method of class from role with parametric signature using where (odd)'; # and a partridge in a pear tree! + is $a, 'odd', + 'role disambiguation via parametric signature with where works (odd)'; + + class RT68074even does A[74] {} + + lives_ok { $a = RT68074even.new.s }, + 'can call method of class from role with parametric signature using where (even)'; + is $a, 'even', + 'role disambiguation via parametric signature with where works (even)'; +} + #?pugs emit =end SKIP # vim: ft=perl6