Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/perl6/roast into issue_2714
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Jun 11, 2019
2 parents 134a8b4 + 0490392 commit b3fe5fd
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions S11-modules/export.t
Expand Up @@ -6,7 +6,7 @@ use lib $?FILE.IO.parent(2).add("packages/RT84280/lib");
use lib $?FILE.IO.parent(2).add("packages/RT125715/lib");
use lib $?FILE.IO.parent(2).add("packages/RT129215/lib");

plan 56;
plan 59;

# L<S11/"Exportation"/>

Expand Down Expand Up @@ -172,8 +172,6 @@ ok( ! &EXPORT::DEFAULT::exp_my_tag,
'Using EXPORT-d type as attribute type works';
}

# vim: ft=perl6

# RT #129215
{
use RT129215;
Expand All @@ -197,3 +195,23 @@ ok( ! &EXPORT::DEFAULT::exp_my_tag,
ok hash_str_u(Hash[Str:U].new({ak => Str:U})), 'Hash[Str:U] istype across module seam';
ok hash_hash_str_u(Hash[Hash[Str:U]].new({akk => Hash[Str:U].new: { ak => Str:U }})), 'Hash[Hash[Str:U]] istype across module seam';
}

# GH #2955
{
my module Foo {
role Bar[$p] is export { method bar { $p } }
role Bar { method bar { "default" } }
}

import Foo;

isa-ok Bar.HOW, Metamodel::ParametricRoleGroupHOW, "role group is exported";

class C1 does Bar[42] { }
is C1.new.bar, 42, "signatured exported role applied";

class C2 does Bar { }
is C2.new.bar, "default", "unsignatured exported role applied";
}

# vim: ft=perl6

0 comments on commit b3fe5fd

Please sign in to comment.