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

Typing of slurpy arrays is self-contradictory in Rakudo #1324

Closed
p6rt opened this issue Sep 27, 2009 · 5 comments
Closed

Typing of slurpy arrays is self-contradictory in Rakudo #1324

p6rt opened this issue Sep 27, 2009 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 27, 2009

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

Searchable as RT69424$

@p6rt
Copy link
Author

p6rt commented Sep 27, 2009

From @masak

<masak> rakudo​: sub foo(Int *@​a) {}; my Int @​b; foo(|@​b)
<p6eval> rakudo 0331d6​: OUTPUT«Parameter type check failed; expected
Int, but got List for @​a in call to foo [...]
* masak submits rakudobug

Rakudo should not expect Int, but Positional[Int] or some such.

@p6rt
Copy link
Author

p6rt commented Oct 29, 2009

From @moritz

On Sun Sep 27 13​:27​:17 2009, masak wrote​:

<masak> rakudo​: sub foo(Int *@​a) {}; my Int @​b; foo(|@​b)
<p6eval> rakudo 0331d6​: OUTPUT«Parameter type check failed; expected
Int, but got List for @​a in call to foo [...]
* masak submits rakudobug

Rakudo should not expect Int, but Positional[Int] or some such.

This works now, just needs tests.

@p6rt
Copy link
Author

p6rt commented Oct 29, 2009

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

@p6rt
Copy link
Author

p6rt commented Oct 29, 2009

From @kyleha

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

commit 59cfc9aaa0b9a58c39223568f675ddc0cec2f752
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Thu Oct 29 13​:47​:57 2009 +0000

  [t/spec] test for RT #​69424, typed slurpy params should accept typed arrays
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;28950 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S06-signature/slurpy-params.t b/t/spec/S06-signature/slurpy-params.t
index cd79949..a002000 100644
--- a/t/spec/S06-signature/slurpy-params.t
+++ b/t/spec/S06-signature/slurpy-params.t
@@ -288,6 +288,14 @@ These tests are the testing for "List parameters" section of Synopsis 06
 eval_dies_ok 'sub rt65324(*@x, $oops) { say $oops }',
              "Can't put required parameter after variadic parameters";
 
+# used to be RT #69424
+{
+    sub typed-slurpy(Int *@a) { 5 }
+    my Int @b;
+    is typed-slurpy(@b), 5, 'can fill typed slurpy with typed array';
+}
+
+
 done_testing;
 
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Oct 29, 2009

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

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