Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MasterDuke17/75444d08468fe3efcb51f685f72ba1a1 to your computer and use it in GitHub Desktop.
Save MasterDuke17/75444d08468fe3efcb51f685f72ba1a1 to your computer and use it in GitHub Desktop.
diff --git 6.c/S04-declarations/my-6c.t 6.c/S04-declarations/my-6c.t
index 301c7f9d8..e13fc0108 100644
--- 6.c/S04-declarations/my-6c.t
+++ 6.c/S04-declarations/my-6c.t
@@ -285,7 +285,7 @@ throws-like 'my $z = $z', X::Syntax::Variable::Initializer, name => '$z';
eval-lives-ok 'my (%h?) #OK', 'my (%h?) lives';
# https://github.com/Raku/old-issue-tracker/issues/734
-eval-lives-ok 'my $x = 3; class A { has $.y = $x; }; A.new.y.gist',
+eval-lives-ok 'my $x = 3; class A734 { has $.y = $x; }.new.y.gist',
'global scoped variables are visible inside class definitions';
{
diff --git 6.c/S14-roles/attributes.t 6.c/S14-roles/attributes.t
index bdd56518a..8076b4c48 100644
--- 6.c/S14-roles/attributes.t
+++ 6.c/S14-roles/attributes.t
@@ -64,30 +64,30 @@ subtest "Basics" => {
subtest "Multi-path consumption" => {
plan 3;
- # Attrbiute from common role consumed by two other roles must not result in a conflict
+ # Attribute from common role consumed by two other roles must not result in a conflict
eval-lives-ok q<
- my role R0 {
+ my role RA0 {
has $.foo;
};
- my role R1 does R0 { };
- my role R2 does R0 { };
- my class C does R1 does R2 { }
+ my role RA1 does RA0 { };
+ my role RA2 does RA0 { };
+ my class AC does RA1 does RA2 { }
>, "indirect double-consumption of the same role doesn't result in conflicting attribute";
eval-lives-ok q<
- my role R0[::T] {
+ my role RB0[::T] {
has T $.foo;
};
- my role R1 does R0[Int] { };
- my role R2 does R0[Int] { };
- my class C does R1 does R2 { }
+ my role RB1 does RB0[Int] { };
+ my role RB2 does RB0[Int] { };
+ my class BC does RB1 does RB2 { }
>, "indirect double-consumption of parameterized role doesn't result in conflicting attribute";
eval-lives-ok q<
- my role R0[::T] {
+ my role RC0[::T] {
has T $.foo;
};
- my role R1[::T] does R0[T] { };
- my role R2[::T] does R0[T] { };
- my class C does R1[Str] does R2[Str] { }
+ my role RC1[::T] does RC0[T] { };
+ my role RC2[::T] does RC0[T] { };
+ my class CC does RC1[Str] does RC2[Str] { }
>, "indirect double-consumption via parameterized roles doesn't result in conflicting attribute";
}
diff --git S02-lexical-conventions/comments.t S02-lexical-conventions/comments.t
index f96c7e668..2bb4d7f61 100644
--- S02-lexical-conventions/comments.t
+++ S02-lexical-conventions/comments.t
@@ -87,6 +87,7 @@ plan 51;
# https://github.com/Raku/old-issue-tracker/issues/3341
{
eval-lives-ok( q{{
+ import Test;
my $var = \#`((( comment ))) 12;
is $var, 12, '#`(((...)))';
}}, 'Unspaced bracketed comment throws no error' );
diff --git S10-packages/scope.t S10-packages/scope.t
index ddaea7992..52d713bc7 100644
--- S10-packages/scope.t
+++ S10-packages/scope.t
@@ -63,6 +63,9 @@ dies-ok { $pkg = Our::Package::pkg },
lives-ok { $pkg = PackageTest::get_our_pkg() },
"Package in scope can see `our' package declarations";
is($pkg, PackageTest::Our::Package, 'correct $?PACKAGE');
+dd $pkg;
+dd "---our---";
+dd ::('Package::Our::Package');
ok(!($pkg === ::('Package::Our::Package')),
'not the same as global type object');
@@ -73,7 +76,10 @@ dies-ok { $pkg = PackageTest::cant_see_pkg() },
"can't see package declared out of scope";
lives-ok { $pkg = PackageTest::my_pkg() },
"can see package declared in same scope";
-is($pkg.^name, 'PackageTest::My::Package', 'correct $?PACKAGE');
+is($pkg, PackageTest::My::Package, 'correct $?PACKAGE');
+dd $pkg;
+dd "---my---";
+dd ::('PackageTest::My::Package');
ok($pkg !=== ::('PackageTest::My::Package'), 'not the same as global type object');
# Check temporization of variables in external packages
diff --git S12-class/magical-vars.t S12-class/magical-vars.t
index 6a77fa772..1e63bd4b8 100644
--- S12-class/magical-vars.t
+++ S12-class/magical-vars.t
@@ -125,11 +125,11 @@ class SimpleClass does Bar {}
{
class ev {
method foo {
- EVAL 'class GLOBAL::evo { method bar { self.WHAT.^name } }'
+ EVAL 'class GLOBAL::evo { method bar { self.WHAT.^name } }; BEGIN "/tmp/t".IO.spurt((GLOBAL::.keys).join("\n"));'
}
};
ev.foo;
- is EVAL('evo.new.bar'), "evo", 'self is not overridden inside an EVAL' ;
+ is EVAL('BEGIN "/tmp/t".IO.spurt((GLOBAL::.keys).join("\n")); evo.new.bar'), "evo", 'self is not overridden inside an EVAL' ;
}
# vim: expandtab shiftwidth=4
diff --git S12-class/stubs.t S12-class/stubs.t
index 50a94f334..f3130137d 100644
--- S12-class/stubs.t
+++ S12-class/stubs.t
@@ -36,10 +36,10 @@ subtest "all forms of yadas work to stub classes" => {
plan 2;
subtest "lives when stubbed, then defined" => {
plan 4;
- eval-lives-ok 「my class Foo { … }; my class Foo {}」, '…';
- eval-lives-ok 「my class Foo { ... }; my class Foo {}」, '...';
- eval-lives-ok 「my class Foo { !!! }; my class Foo {}」, '!!!';
- eval-lives-ok 「my class Foo { ??? }; my class Foo {}」, '???';
+ eval-lives-ok 「my class Foo { … }; class Foo {}」, '…';
+ eval-lives-ok 「my class Foo { ... }; class Foo {}」, '...';
+ eval-lives-ok 「my class Foo { !!! }; class Foo {}」, '!!!';
+ eval-lives-ok 「my class Foo { ??? }; class Foo {}」, '???';
}
subtest "throws when stubbed, and never defined" => {
diff --git S14-roles/composition.t S14-roles/composition.t
index 777ae8295..a99dfe787 100644
--- S14-roles/composition.t
+++ S14-roles/composition.t
@@ -243,7 +243,7 @@ ok rB !~~ RT64002, 'role not matched by second role it does';
# https://github.com/rakudo/rakudo/issues/2418
{
lives-ok {
- 'role A { method x { ... } }; class B does A { has $.x }'.EVAL
+ 'role A2418 { method x { ... } }; class B2418 does A2418 { has $.x }'.EVAL
}, 'public attribute acceptable as method';
}
diff --git packages/S12-meta/lib/Supersede1.rakumod packages/S12-meta/lib/Supersede1.rakumod
index 56fd6beeb..6034ea45b 100644
--- packages/S12-meta/lib/Supersede1.rakumod
+++ packages/S12-meta/lib/Supersede1.rakumod
@@ -1,5 +1,5 @@
my package EXPORTHOW {
- class SUPERSEDE::class is Metamodel::ClassHOW {
+ my class SUPERSEDE::class is Metamodel::ClassHOW {
method tryit($) { 'pony' }
}
}
diff --git packages/S12-meta/lib/Supersede2.rakumod packages/S12-meta/lib/Supersede2.rakumod
index c15886ce5..65ce6f3d1 100644
--- packages/S12-meta/lib/Supersede2.rakumod
+++ packages/S12-meta/lib/Supersede2.rakumod
@@ -1,5 +1,5 @@
my package EXPORTHOW {
- class SUPERSEDE::class is Metamodel::ClassHOW {
+ my class SUPERSEDE::class is Metamodel::ClassHOW {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment