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
No warning for non-octal numbers starting with 0 in Rakudo #2300
Comments
From @bbkr[18:05] <bbkr> std: 01 [18:05] <bbkr> rakudo: 01 |
From @masak<masak> rakudo: say 01234 |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in integration/error-reporting.t commit eb032c702f08195650b08a5235ba4cd5a8585a89 [error-reporting.t] Add test for RT #80982 Inline Patchdiff --git a/integration/error-reporting.t b/integration/error-reporting.t
index 4b97913..5d63d01 100644
--- a/integration/error-reporting.t
+++ b/integration/error-reporting.t
@@ -62,4 +62,12 @@ A.new.x(42);',
err => rx/'line 3'>>/,
}, 'got the right line number for accessors';
+# RT #80982
+is_run 'say 0080982',
+ {
+ status => 0,
+ out => "80982\n",
+ err => rx/ octal /,
+ }, 'use of leading zero causes warning about octal';
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @tadzikPatch attached. Kind regards, |
From @tadzik0001-Warn-about-leading-0-not-meaning-octal-in-Perl6-fixe.patchFrom e74c36f7b7ef1a41a7b70278edf67476d3584cf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= <tadzikes@gmail.com>
Date: Thu, 6 Jan 2011 00:09:22 +0100
Subject: [PATCH] Warn about leading 0 not meaning octal in Perl6, fixes RT #80982
---
src/Perl6/Grammar.pm | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm
index 5f0c8b2..77e1237 100644
--- a/src/Perl6/Grammar.pm
+++ b/src/Perl6/Grammar.pm
@@ -1326,6 +1326,8 @@ token number:sym<numish> { <numish> }
token numish {
[
+ # TODO: Should be <.worry()>
+ | 0 <integer> <.panic('Leading 0 does not indicate octal in Perl 6; please use leading 0o if you mean that')>
| <dec_number>
| <integer>
| <rad_number>
--
1.7.2.2
|
From @cokeMerged tickets. -- |
1 similar comment
From @cokeMerged tickets. -- |
From @jnthnOn Wed Sep 01 09:09:03 2010, pawel.pabian@implix.com wrote:
It warns now, and enabled the test for it too, so resolving. Thanks! Jonathan |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#80982 (status was 'resolved')
Searchable as RT80982$
The text was updated successfully, but these errors were encountered: