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

Renaming named parameters of the form :f($foo) are not accurately represented in the .signature in Rakudo #1336

Closed
p6rt opened this issue Oct 1, 2009 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 1, 2009

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

Searchable as RT69516$

@p6rt
Copy link
Author

p6rt commented Oct 1, 2009

From @masak

<masak> rakudo​: sub foo( :f($foo) ) {}; say &foo.signature.perl
<p6eval> rakudo ffe648​: OUTPUT«​:(Any :$foo?)␤»
<jnthn> masak​: that looks wrong.
<masak> I thought so, too.
* masak submits rakudobug
<jnthn> masak​: But actuallly we cheat rather than do that stuff right.
<jnthn> If you attempt :foo(​:bar(​:$baz)) you are also going to find it
does not yet work.

@p6rt
Copy link
Author

p6rt commented Oct 9, 2009

From @jnthn

On Thu Oct 01 03​:43​:28 2009, masak wrote​:

<masak> rakudo​: sub foo( :f($foo) ) {}; say &foo.signature.perl
<p6eval> rakudo ffe648​: OUTPUT«​:(Any :$foo?)␤»
<jnthn> masak​: that looks wrong.
<masak> I thought so, too.
* masak submits rakudobug
<jnthn> masak​: But actuallly we cheat rather than do that stuff right.
<jnthn> If you attempt :foo(​:bar(​:$baz)) you are also going to find it
does not yet work.

Fixed in git 174e0d6, during re-write of Signature.perl into the
setting. Assigning to moritz++ for spectests.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Oct 9, 2009

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

@p6rt
Copy link
Author

p6rt commented Oct 9, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/named-parameters.t

commit 7db1d626f5020c43f254f46ad09df9f62ad16eef
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Fri Oct 9 17​:48​:00 2009 +0000

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

Inline Patch
diff --git a/t/spec/S06-signature/named-parameters.t b/t/spec/S06-signature/named-parameters.t
index 56934c9..f10dce5 100644
--- a/t/spec/S06-signature/named-parameters.t
+++ b/t/spec/S06-signature/named-parameters.t
@@ -1,7 +1,7 @@
 use v6;
 use Test;
 
-plan 77;
+plan 78;
 
 # L<S06/Required parameters/"Passing a named argument that cannot be bound to
 # a normal subroutine is also a fatal error.">
@@ -227,4 +227,11 @@ eval_dies_ok 'sub rt68086( $a, $a ) { }', 'two sub params with the same name';
         '.signature.perl with required parameter includes requirement' );
 }
 
+# RT #69516
+{
+    sub rt69516( :f($foo) ) { "You passed '$foo' as 'f'" }
+    ok( &rt69516.signature.perl ~~ m/ ':f(' \s* '$foo' \s* ')' /,
+        'parameter rename appears in .signature.perl' );
+}
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Oct 9, 2009

From @kyleha

The new test for this passes, so I'm marking this resolved.

@p6rt
Copy link
Author

p6rt commented Oct 9, 2009

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

@p6rt p6rt closed this as completed Oct 9, 2009
@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