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
Can't mix in True or False as ($value but True) #983
Comments
From @moritzThis works fine: $ ./perl6 -e 'enum A <b c>; ("abc" but c).uc.say' This doesn't $ >./perl6 -e '("abc" but Bool::True).uc.say' So it seems that Bool isn't a real Enum somehow. This needs to be fixed. Cheers, |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/bool.t commit 6830b4069cc912139a59426d92589d5e81e22e31 [t/spec] Test for RT #65514 Inline Patchdiff --git a/t/spec/S02-builtin_data_types/bool.t b/t/spec/S02-builtin_data_types/bool.t
index 25e6db9..95d408e 100644
--- a/t/spec/S02-builtin_data_types/bool.t
+++ b/t/spec/S02-builtin_data_types/bool.t
@@ -1,12 +1,9 @@
use v6;
-
use Test;
-
+plan *;
# L<S12/Enums/"Two built-in enums are">
-plan 24;
-
# tests True and False are Bool's
isa_ok(Bool::True, Bool);
isa_ok(Bool::False, Bool);
@@ -56,5 +53,13 @@ is(++$bool, Bool::True, 'Increment of Bool::True still produces Bool::True');
is(--$bool, Bool::False, 'Decrement of Bool::True produces Bool::False');
is(--$bool, Bool::False, 'Decrement of Bool::False produces Bool::False');
+# RT #65514
+{
+ #?rakudo 2 skip 'RT #65514 mix in bool with "but"'
+ ok (0 but Bool::True), 'Bool::True works with "but"';
+ is ('RT65514' but Bool::False), 'RT65514', 'Bool::False works with "but"';
+}
+
+done_testing;
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sat May 09 04:31:06 2009, moritz wrote:
You can now write this; it works for now thanks to the chunk of S14 Thanks, Jonathan |
@jnthn - Status changed from 'open' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/bool.t commit 73e1a1a4627cb62445ffc7409e755ea71002c05b [t/spec] Unfudge tests for RT#65514 and add a couple of extra ones for it too. Inline Patchdiff --git a/t/spec/S02-builtin_data_types/bool.t b/t/spec/S02-builtin_data_types/bool.t
index 08c8c27..a402335 100644
--- a/t/spec/S02-builtin_data_types/bool.t
+++ b/t/spec/S02-builtin_data_types/bool.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 37;
+plan 39;
#L<S12/Enumerations/"Two built-in enumerations are">
@@ -67,8 +67,9 @@ is(--$bool, Bool::False, 'Decrement of Bool::False produces Bool::False');
# RT #65514
{
- #?rakudo 2 skip 'RT #65514 mix in bool with "but"'
ok (0 but Bool::True), 'Bool::True works with "but"';
+ is (0 but Bool::True), 0, 'Bool::True works with "but"';
+ ok !('RT65514' but Bool::False), 'Bool::False works with "but"';
is ('RT65514' but Bool::False), 'RT65514', 'Bool::False works with "but"';
}
|
Migrated from rt.perl.org#65514 (status was 'resolved')
Searchable as RT65514$
The text was updated successfully, but these errors were encountered: