From 0a6fd2cc48fc9a3a05efff4c304ec172ac9c5efd Mon Sep 17 00:00:00 2001 From: jnthn Date: Sat, 12 Dec 2015 21:58:09 +0100 Subject: [PATCH] Tests for RT #126606. --- S14-roles/stubs.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/S14-roles/stubs.t b/S14-roles/stubs.t index 419ace2bec..2a82b93d4b 100644 --- a/S14-roles/stubs.t +++ b/S14-roles/stubs.t @@ -1,7 +1,7 @@ use v6; use Test; -plan 14; +plan 28; role WithStub { method a() { ... } }; role ProvidesStub1 { method a() { 1 } }; @@ -59,3 +59,11 @@ throws-like { EVAL 'my role F119643 { ... }; class C119643 does F119643 {}' }, my class C does B does A { } is C.new.bar(), "success!", 'private method call in role dispatches on type of target class'; } + +# RT #126606 +{ + my role R { method m() { ... } } + for { + lives-ok { R."$_"() }, ".$_ on role with requirement does not pun it and die"; + } +}