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

Junctions shouldn't autothread over slurpy params #1196

Closed
p6rt opened this issue Aug 3, 2009 · 4 comments
Closed

Junctions shouldn't autothread over slurpy params #1196

p6rt opened this issue Aug 3, 2009 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 3, 2009

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

Searchable as RT68142$

@p6rt
Copy link
Author

p6rt commented Aug 3, 2009

From @pmichaud

S09​:1043 says that junctions passed as components of a slurpy
array or hash do not cause autothreading, but Rakudo currently
autothreads junctions over slurpies on some multisubs​:

  $ cat x
  multi sub foo(*@​a) { say 'foo'; }
  multi sub bar(Any *@​a) { say 'bar'; }
 
  foo(1|2|3);
  bar(1|2|3);

  $ ./perl6 x
  foo
  bar
  bar
  bar
  $

As of 91408af, the call to foo() is correct.

The call to bar() should either execute once, or fail outright
(because a Junction argument isn't of type Any).

Tests for this are being added to S06-signature/slurpy-params.t .

Pm

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

From @jnthn

On Sun Aug 02 19​:21​:08 2009, pmichaud wrote​:

S09​:1043 says that junctions passed as components of a slurpy
array or hash do not cause autothreading, but Rakudo currently
autothreads junctions over slurpies on some multisubs​:

$ cat x
multi sub foo\(\*@​a\) \{ say 'foo'; \}
multi sub bar\(Any \*@​a\) \{ say 'bar'; \}

foo\(1|2|3\);
bar\(1|2|3\);

$ \./perl6 x
foo
bar
bar
bar
$ 

As of 91408af, the call to foo() is correct.

The call to bar() should either execute once, or fail outright
(because a Junction argument isn't of type Any).

Tests for this are being added to S06-signature/slurpy-params.t .

Now gives​:

foo
bar

Assigned to moritz++ for tests to be reviewed/enabled.

Jonathan

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

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

@p6rt
Copy link
Author

p6rt commented Mar 28, 2010

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

@p6rt p6rt closed this as completed Mar 28, 2010
@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