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
Less than awesome error message for failed assignment type checks on subtypes in Rakudo #1120
Comments
From @masak<masak> rakudo: subset Positive of Num where { $^n > 0 }; my Positive |
From @masak<masak> rakudo: subset Positive of Num where { $^n > 0 }; my Positive |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S02-polymorphic_types/subset.t commit c1b879f2c8688410bf87081759a082bb80806eb7 [t/spec] tests for RT #67786 Inline Patchdiff --git a/t/spec/S02-polymorphic_types/subset.t b/t/spec/S02-polymorphic_types/subset.t
index b821643..3a75de6 100644
--- a/t/spec/S02-polymorphic_types/subset.t
+++ b/t/spec/S02-polymorphic_types/subset.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 29;
+plan 31;
=begin description
@@ -120,4 +120,16 @@ eval_dies_ok 'my Digit $x = 3.1',
'subset of Str where pattern in braces enforces pattern';
}
+# RT #67786
+{
+ subset RT67786 of Int where { $^i > 0 }
+ my RT67786 $rt67786;
+
+ try { $rt67786 = -42 }
+
+ ok $! ~~ Exception, 'subset of Int enforces where clause';
+ #?rakudo todo 'RT #67786'
+ ok "$!" ~~ / RT67786 /, 'error for bad assignment mentions subset';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
@coke - Status changed from 'new' to 'open' |
From @bbkrNOM bbkr:nom bbkr$ ./perl6 -e 'subset Positive of Num where { $^n > 0 }; my checking tests... |
From @bbkrMentioned tests are unfudged and passing. |
@bbkr - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#67256 (status was 'resolved')
Searchable as RT67256$
The text was updated successfully, but these errors were encountered: