diff --git a/S11-modules/gh2979.t b/S11-modules/gh2979.t new file mode 100644 index 0000000000..62b96e6e8d --- /dev/null +++ b/S11-modules/gh2979.t @@ -0,0 +1,21 @@ +use v6; +use Test; + +plan 8; + +# GH#2979 Symbols are not to be exported in containerized form. + +use lib $?FILE.IO.parent(2).add("packages/S11-modules/lib"); + +use GH2979; + +is @foo.VAR.^name, 'Array', 're-exported Array'; +is %foo.VAR.^name, 'Hash', 're-exported Hash'; +is $foo.VAR.^name, 'Scalar', 're-exported Scalar'; +is &foo.VAR.^name, 'Sub', 're-exported Sub'; +is @bar.VAR.^name, 'Array', 'exported Array'; +is %bar.VAR.^name, 'Hash', 'exported Hash'; +is $bar.VAR.^name, 'Scalar', 'exported Scalar'; +is &bar.VAR.^name, 'Sub', 'exported Sub'; + +# vim: ft=perl6 sw=4 expandtabs diff --git a/packages/S11-modules/lib/GH2979-Foo.pm6 b/packages/S11-modules/lib/GH2979-Foo.pm6 new file mode 100644 index 0000000000..64c915ec31 --- /dev/null +++ b/packages/S11-modules/lib/GH2979-Foo.pm6 @@ -0,0 +1,7 @@ +use v6; +unit module GH2979-Foo; + +our @foo is export; +our %foo is export; +our $foo is export; +sub foo is export { } diff --git a/packages/S11-modules/lib/GH2979.pm6 b/packages/S11-modules/lib/GH2979.pm6 new file mode 100644 index 0000000000..e8c0503290 --- /dev/null +++ b/packages/S11-modules/lib/GH2979.pm6 @@ -0,0 +1,17 @@ +use v6; +use GH2979-Foo; + +our @b; +our %b; +our $b; +sub b { } + +multi EXPORT { + %( + GH2979-Foo::EXPORT::ALL::, + '@bar' => @b, + '%bar' => %b, + '$bar' => $b, + '&bar' => &b, + ) +}