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
LTA error messages on literals with too many decimals in Rakudo #1566
Comments
From @masak<masak> rakudo: say 0.00000000000000000000 # also by diakopterbot Here it's just a question of catching the error sooner and emitting a |
From @masak<lue> rakudo: say 0.00000000000000000000000000000000 |
From [Unknown Contact. See original ticket]<lue> rakudo: say 0.00000000000000000000000000000000 |
|
@masak - Status changed from 'new' to 'open' |
From @bbkrall cases work on Kiev build, taking for tests. |
From @bbkrIt looks like it's not resolved yet for very long decimal part: $ perl6 -e 'eval "say 0." ~ "0" x 1024; say $!' Leaving open. |
From @bbkrlast case works on * release perl6 -e 'eval "say 0." ~ "0" x 1024; say $!' |
From @bbkralso did tests using following code: use Test; my $e = "0."; for 1..1024 { $e ~= "0"; eval_lives_ok $e } and all cases passed |
From @bbkrtests added in t/spec/S02-literals/numeric.t |
|
@bbkr - 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-literals/numeric.t commit 806c7d7a2efa5235bb9ee53d0d0a60a7ebe94a74 [t/spec] tests for RT #73236 LTA error messages on literals with too many decimals Inline Patchdiff --git a/t/spec/S02-literals/numeric.t b/t/spec/S02-literals/numeric.t
index 135fb87..921358f 100644
--- a/t/spec/S02-literals/numeric.t
+++ b/t/spec/S02-literals/numeric.t
@@ -31,6 +31,24 @@ nok 1+1i ~~ Real, '1+1i is not Real';
is_approx 3.14159265358979323846264338327950288419716939937510e0,
3.141592, 'very long Num literals';
+# RT #73236
+{
+ eval_lives_ok '0.' ~ '0' x 19,
+ 'parsing 0.000... with 19 decimal places lives';
+
+ eval_lives_ok '0.' ~ '0' x 20,
+ 'parsing 0.000... with 20 decimal places lives';
+
+ eval_lives_ok '0.' ~ '0' x 63,
+ 'parsing 0.000... with 63 decimal places lives';
+
+ eval_lives_ok '0.' ~ '0' x 66,
+ 'parsing 0.000... with 66 decimal places lives';
+
+ eval_lives_ok '0.' ~ '0' x 1024,
+ 'parsing 0.000... with 1024 decimal places lives';
+}
+
done_testing;
# vim: ft=perl6 sw=4 ts=4 expandtab |
Migrated from rt.perl.org#73236 (status was 'resolved')
Searchable as RT73236$
The text was updated successfully, but these errors were encountered: