Skip to content

Commit

Permalink
Tests for pull request #2717 (GH ticket #2714)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Feb 22, 2019
1 parent 2a41c2c commit 8728c57
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion S14-roles/typecheck.t
Expand Up @@ -3,7 +3,7 @@ use lib $?FILE.IO.parent(2).add("packages/Roles/lib");

use Test;

plan 4;
plan 7;

# GH #2613
use GH2613;
Expand All @@ -13,3 +13,18 @@ ok TestGH2613.^does(R1), "class typecheck against short role name";
ok TestGH2613.^does(GH2613::R1), "class typecheck against full role name";
ok TestGH2613 ~~ R1, "class smartmatches against short role name";
ok TestGH2613 ~~ GH2613::R1, "class smartmatches against full role name";

# GH #2714
{
my class C2714_1 { }
my class C2714_2 { }
my role R2714_1 is C2714_1 { }
my role R2714_1[::T] is C2714_2 { }

ok R2714_1 ~~ C2714_1, "Role group matches a parent class of its non-parameterized member";
nok R2714_1 ~~ C2714_2, "Role group doesn't a parent class of a parameterized member";

#?rakudo: 1 todo "Must work with a fix for GH #2698"
my \r = R2714_1[Int];
ok r ~~ C2714_2, "Curryied role matches its parent class";
}

0 comments on commit 8728c57

Please sign in to comment.