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
.isa(Obj,Str) doesn't work correctly if the Str contains colons. #1376
Comments
From adam.prime@utoronto.caThe attached patch adds 4 more tests to 07-isa.t. test #6 currently fails. Adam |
From adam.prime@utoronto.caisa.diffdiff --git a/t/01-sanity/07-isa.t b/t/01-sanity/07-isa.t
index 9fc9a2f..0b706ff 100644
--- a/t/01-sanity/07-isa.t
+++ b/t/01-sanity/07-isa.t
@@ -1,7 +1,7 @@
use v6;
-say "1..3";
+say "1..7";
{
my $string = "Pugs";
@@ -17,3 +17,15 @@ say "1..3";
my $code = { 42 };
if $code.isa("Code") { say "ok 3" } else { say "not ok 3" }
}
+class Thing {};
+{
+ my $thing = Thing.new();
+ if $thing.isa("Thing") { say "ok 4" } else { say "not ok 4" }
+ if $thing.isa(Thing) { say "ok 5" } else { say "not ok 5" }
+}
+class Thing::something {};
+{
+ my $thing = Thing::something.new();
+ if $thing.isa("Thing::something") { say "ok 6" } else { say "not ok 6" }
+ if $thing.isa(Thing::something) { say "ok 7" } else { say "not ok 7" }
+}
|
From @kylehaThis is an automatically generated mail to inform you that tests are now available in at least one of these files: AUTHORS, t/spec/S29-any/isa.t commit 8000490d34a3e1073e29c05f57df81ebf06b4308 Tests for RT #69999, .isa on classes with colons in their names Inline Patchdiff --git a/AUTHORS b/AUTHORS
index 9f3f4d8..44a2610 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -7,6 +7,7 @@ Aaron "ajs" Sherman (ASHER)
Aankhola Encorporated (AANKHEN)
Adam "alias" Kennedy (ADAMK)
Adam Preble
+Adam "jsut" Prime (APRIME)
Adrian "adehohum" Taylor
Adriano Ferreira (FERREIRA)
Adrian "Auzon" Kreher
diff --git a/t/spec/S29-any/isa.t b/t/spec/S29-any/isa.t
index 88a0361..7e21a0d 100644
--- a/t/spec/S29-any/isa.t
+++ b/t/spec/S29-any/isa.t
@@ -18,7 +18,7 @@ L<S29/Any/=item isa/>
=end kwid
-plan 11;
+plan 15;
{ # invocant notation
my @arr = <1 2 3 4>;
@@ -59,4 +59,17 @@ plan 11;
ok(![1, 2, 3, 4].isa(Hash), '... [1, 2, 3, 4].isa("Hash") fail predicably');
}
+class Thing {};
+{
+ my $thing = Thing.new();
+ ok($thing.isa("Thing"));
+ ok($thing.isa(Thing));
+}
+class Thing::something {};
+{
+ my $thing = Thing::something.new();
+ ok($thing.isa("Thing::something"));
+ ok($thing.isa(Thing::something));
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @bbkrstill broken on * build [13:39] <bbkr> rakudo: use Test; class Thing::something {}; my $thing = |
From @bbkrNOM bbkr:nom bbkr$ ./perl6 -e 'use Test; class Thing::something {}; my |
From @bbkrThose tests are now in S29-any/isa.t, unfudged and passing. |
@bbkr - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#69999 (status was 'resolved')
Searchable as RT69999$
The text was updated successfully, but these errors were encountered: