New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null PMC access when doing 'use' within class in Rakudo #888
Comments
From @masakOn Rakudo 679e480 and Parrot r38094, the following happens when one $ perl6 -e 'class A; use Test' Semicolon or block syntax on the class decl ist egal. So is using |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S10-packages/basic.t commit f8866a9b95a6789d0692b1018a771d35e7ff35ef [t/spec] Tests for RT #64688 Inline Patchdiff --git a/t/spec/S10-packages/basic.t b/t/spec/S10-packages/basic.t
index 44c2c4e..9fe31ed 100644
--- a/t/spec/S10-packages/basic.t
+++ b/t/spec/S10-packages/basic.t
@@ -4,7 +4,7 @@ use v6;
use Test;
-plan 22;
+plan 32;
regex fairly_conclusive_platform_error {:i ^\N*<<Null?>>}
@@ -146,4 +146,18 @@ eval_lives_ok q' module MapTester { (1, 2, 3).map: { $_ } } ',
'array initialization works fine in imported subs';
}
+#?rakudo todo 'RT #64688'
+{
+ eval_lives_ok 'class RT64688_c1;use Test', 'use after class line';
+ eval_lives_ok 'class RT64688_c1 { use Test }', 'use in class block';
+ eval_lives_ok 'module RT64688_m1;use Test', 'use after module line';
+ eval_lives_ok 'module RT64688_m2 { use Test }', 'use in module block';
+ eval_lives_ok 'package RT64688_p1;use Test', 'use after package line';
+ eval_lives_ok 'package RT64688_p2 { use Test }', 'use in package block';
+ eval_lives_ok 'grammar RT64688_g1;use Test', 'use after grammar line';
+ eval_lives_ok 'grammar RT64688_g2 { use Test }', 'use in grammar block';
+ eval_lives_ok 'role RT64688_r1;use Test', 'use after role line';
+ eval_lives_ok 'role RT64688_r2 { use Test }', 'use in role block';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @carbinEasiest way to do this:
Real way to do this: $ perl6 test.pl Putting the 'use' declaration outside of the class works as a work-around. -- |
From philipp@marek.priv.atUsing the two attached files, and doing perl6 -e 'use W' gives me a Null PMC access. Without "is export" it's gone, but of course the function isn't exported. -- |
From @ShimmerFairyNone of these problems return a Null PMC access anymore. However, the The posted additions to t/spec/S10-packages/basic.t pass (although the |
@ShimmerFairy - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#64688 (status was 'resolved')
Searchable as RT64688$
The text was updated successfully, but these errors were encountered: