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

'sub' cannot be used as a routine name #1005

Closed
p6rt opened this issue May 19, 2009 · 8 comments
Closed

'sub' cannot be used as a routine name #1005

p6rt opened this issue May 19, 2009 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 19, 2009

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

Searchable as RT65804$

@p6rt
Copy link
Author

p6rt commented May 19, 2009

From @azawawi

Given that​:

sub if($foo) {
  say "From if!\n";
};
if(1);

Works under std/rakudo. The same should work to this case (if i am not
mistaken)​:

sub sub($foo) {
  say "From sub!\n";
};
sub(1);

Regards,
Ahmad M. Zawawi

@p6rt
Copy link
Author

p6rt commented Aug 2, 2009

From @masak

This one seems fixed.

<masak> rakudo​: sub sub($foo) { say "OH HAI" }; sub(1)
<p6eval> rakudo e02bc0​: OUTPUT«OH HAI␤»
* masak closes #​65804

I'd close, but it could perhaps use a spectest; assigning to KyleHa++.

@p6rt
Copy link
Author

p6rt commented Aug 2, 2009

From [Unknown Contact. See original ticket]

This one seems fixed.

<masak> rakudo​: sub sub($foo) { say "OH HAI" }; sub(1)
<p6eval> rakudo e02bc0​: OUTPUT«OH HAI␤»
* masak closes #​65804

I'd close, but it could perhaps use a spectest; assigning to KyleHa++.

@p6rt
Copy link
Author

p6rt commented Aug 2, 2009

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 2, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S02-names/identifier.t

commit 6691821ec8ec940f2ad5964121be8232c1c6b720
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun Aug 2 17​:57​:00 2009 +0000

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

Inline Patch
diff --git a/t/spec/S02-names/identifier.t b/t/spec/S02-names/identifier.t
index 494e36c..ef80800 100644
--- a/t/spec/S02-names/identifier.t
+++ b/t/spec/S02-names/identifier.t
@@ -1,7 +1,7 @@
 use v6;
 use Test;
 
-plan 13;
+plan 14;
 
 # L<S02/Names/An identifier is composed of an alphabetic character>
 
@@ -54,4 +54,10 @@ plan 13;
     is method-check(), 'method-check', 'can call method-check';
 }
 
+# RT #65804
+{
+    sub sub($foo) { $foo }
+    is sub('RT #65804'), 'RT #65804', 'sub named "sub" works';
+}
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Aug 2, 2009

From @kyleha

On Sun Aug 02 01​:16​:19 2009, masak wrote​:

I'd close, but it could perhaps use a spectest; assigning to KyleHa++.

The new test is passing, so I'll resolve this now.

@p6rt
Copy link
Author

p6rt commented Aug 2, 2009

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

@p6rt p6rt closed this as completed Aug 2, 2009
@p6rt
Copy link
Author

p6rt commented Aug 3, 2009

From @azawawi

Alright thanks...

On Sun, Aug 2, 2009 at 9​:02 PM, Kyle Hasselbacher via
RT<perl6-bugs-followup@​perl.org> wrote​:

According to our records, your request regarding
 "[BUG] 'sub' cannot be used as a routine name"
has been resolved.

If you have any further questions or concerns, please respond to this message.

For other topics, please create a new ticket.

Please don't feel obligated to say "Thanks" or "Kudos" or "I owe you a beer" -- if you respond to this message it will reopen the ticket. If you must, please send email directly to the person who handled your ticket, and not to the tracking system.

<URL​: http://rt.perl.org/rt3/Ticket/Display.html?id=65804 >

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant