Skip to content
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

Rakudo still parses 'int time', STD.pm doesn't #949

Closed
p6rt opened this issue Apr 25, 2009 · 5 comments
Closed

Rakudo still parses 'int time', STD.pm doesn't #949

p6rt opened this issue Apr 25, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 25, 2009

Migrated from rt.perl.org#65132 (status was 'resolved')

Searchable as RT65132$

@p6rt
Copy link
Author

p6rt commented Apr 25, 2009

From @masak

<masak> std​: int time
<p6eval> std 26432​: OUTPUT«##### PARSE FAILED #####␤Syntax error (two
terms in a row?) at /tmp/sVmFU0bTTE line 1​:␤------> �[32mint
�[31mtime�[0m␤ expecting any of​:␤ infix or meta-infix␤ infix
stopper␤ standard stopper␤ statement modifier loop␤
terminator␤FAILED 00​:02 35m␤»
<masak> std​: int(time)
<p6eval> std 26432​: OUTPUT«ok 00​:02 35m␤»
<moritz_> ah, prefix​:int is banned from the spec
<masak> rakudo​: int time
<p6eval> rakudo 7bbc62​: ( no output )
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in at least one of these files​: t/spec/S32-num/int.t, t/spec/S32-temporal/Temporal.t

commit 6d920b0174a83cf0f4d2deefb1cfd07c3d9786e0
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun Aug 16 03​:59​:35 2009 +0000

  [t/spec] Test for RT #​65132
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;28000 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S32-num/int.t b/t/spec/S32-num/int.t
index 913b51b..060e3bc 100644
--- a/t/spec/S32-num/int.t
+++ b/t/spec/S32-num/int.t
@@ -1,6 +1,6 @@
 use v6;
 use Test;
-plan 66;
+plan 68;
 
 # L<S32::Numeric/Num/"=item truncate">
 # truncate and int() are synonynms.
@@ -87,4 +87,12 @@ is(int(Inf),    Inf, "int Inf is Inf");
 is(int(-Inf),  -Inf, "int -Inf is -Inf");
 is(int(NaN),    NaN, "int NaN is NaN");
 
+# RT #65132
+{
+    #?rakudo todo 'no more prefix:int'
+    eval_dies_ok 'int time', 'dies: int time (prefix:int is gone)';
+    my $t = time;
+    is int($t), $t.int, 'int(time) == time.int'
+}
+
 # vim: ft=perl6
diff --git a/t/spec/S32-temporal/Temporal.t b/t/spec/S32-temporal/Temporal.t
index c42ce6a..0db2cf1 100644
--- a/t/spec/S32-temporal/Temporal.t
+++ b/t/spec/S32-temporal/Temporal.t
@@ -73,7 +73,7 @@ ok $g1.epoch==3661, "epoch at 1970-01-01 01:01:01"; # test 15
 ok ~$g1 eq '1970-01-01T01:01:01+0100', "as Str 1970-01-01T01:01:01+0100"; # test 16
 
 # round trip test for current number of seconds in the Unix epoch
-$t = int time;
+$t = time.int;
 my @t = test_gmtime( $t );
 $g1 = Temporal::DateTime.new(
           date => Temporal::Date.new( :year(@t[5]+1900), :month(@t[4]+1), :day(@t[3]) ),

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 9, 2010

From @moritz

prefix​:<int> is long gone; currently rakudo parses 'int time' as an
(undeclared9 int() listop, and barfs at compile time. As soon as Rakudo
implements native types, it will parse the same was as STD.pm does.

@p6rt
Copy link
Author

p6rt commented Mar 9, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 9, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant