Skip to content

Commit 985d992

Browse files
committed
Test for RT #125715.
1 parent 9263645 commit 985d992

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

S11-modules/export.t

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 40;
4+
plan 41;
55

66
# L<S11/"Exportation"/>
77

@@ -179,4 +179,17 @@ ok( ! &EXPORT::DEFAULT::exp_my_tag,
179179
'adequate error message when multi sub exported out of a module fails to bind to an argument that happens to be a block';
180180
}
181181

182+
# RT #125715
183+
{
184+
use lib 't/spec/packages';
185+
use RT125715;
186+
187+
my class Baz {
188+
has Bar $.bar;
189+
}
190+
191+
lives-ok { Baz.new(bar => Bar.new) },
192+
'Using EXPORT-d type as attribute type works';
193+
}
194+
182195
# vim: ft=perl6

packages/RT125715.pm6

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Foo {}
2+
sub EXPORT(|){ { 'Bar' => Foo } }

0 commit comments

Comments
 (0)