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

Skipped tests in S32-list/map.t: "Too few positionals passed" when placeholder variables in map block get no value #4232

Closed
p6rt opened this issue May 10, 2015 · 2 comments

Comments

@p6rt
Copy link

p6rt commented May 10, 2015

Migrated from rt.perl.org#125146 (status was 'new')

Searchable as RT125146$

@p6rt
Copy link
Author

p6rt commented May 10, 2015

From @usev6

There are two skipped tests in S32-list/map.t which can be shortened to something like​:

$ perl6 -e 'say (1,2,3).map({$^a + $^b})'
Too few positionals passed; expected 2 arguments but got 1
  in block <unit> at -e​:1

The tests seem to expect that placeholder arguments which get no value are treated as zeros.

@lizmat
Copy link
Contributor

lizmat commented Jan 12, 2020

Raku/roast@92fca54519ece3351265e93 changed the test to make sure that the signature of the block must always match the arguments given. The auto-generating $^a syntax will never create optional parameters. So the original tests were never going to pass. The new test now codify the current behaviour.

@lizmat lizmat closed this as completed Jan 12, 2020
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

2 participants