Skip to content

Commit

Permalink
no Perl6/World.nqp in warning
Browse files Browse the repository at this point in the history
When one module is used in another, with $!foo is rw trait.

RT#126302: https://rt.perl.org/Ticket/Display.html?id=126302
  • Loading branch information
zoffixznet committed Sep 10, 2016
1 parent f71b8a6 commit 0c7d68f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S10-packages/use-with-class.t
Expand Up @@ -7,7 +7,7 @@ use Test;

# L<S11/Compile-time Importation>

plan 9;
plan 11;

# test that 'use' imports class names defined in imported packages

Expand Down Expand Up @@ -53,4 +53,13 @@ ok Stupid::Class.new(), 'can instantiate object of "imported" class';
lives-ok { class Bar { } }, 'declaring a class after use-ing a module (RT #73910)'
}

# RT #126302
{
my $p = run :out, :err, $*EXECUTABLE, '-It/spec/packages', '-e',
'use RT126302; say "RT126302-OK"';

like $p.out.slurp-rest, /'RT126302-OK'/, 'packages compile successfully'; unlike $p.err.slurp-rest, /'src/Perl6/World.nqp'/,
'no Perl6/World.nqp in warning';
}

# vim: ft=perl6
2 changes: 2 additions & 0 deletions packages/RT126302.pm6
@@ -0,0 +1,2 @@
no precompilation;
class RT126302 { use RT126302::B; }
2 changes: 2 additions & 0 deletions packages/RT126302/B.pm6
@@ -0,0 +1,2 @@
no precompilation;
class RT126302::B { has $!foo is rw; }

0 comments on commit 0c7d68f

Please sign in to comment.