Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[t] We now pass 41-flat.t.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!./parrot nqp.pbc | ||
|
|
||
| # flattened arguments | ||
|
|
||
| plan(6); | ||
|
|
||
| sub xyz($x, $y, $z) { | ||
| ok( $x == 7, 'first argument'); | ||
| ok( $y == 8, 'second argument'); | ||
| ok( $z == 9, 'third argument'); | ||
| } | ||
|
|
||
| sub ijk(:$i, :$j, :$k) { | ||
| ok( $i == 1, 'first named argument'); | ||
| ok( $j == 2, 'second named argument'); | ||
| ok( $k == 3, 'third named argument'); | ||
| } | ||
|
|
||
| my @a := [7,8,9]; | ||
| xyz(|@a); | ||
|
|
||
| my %a; | ||
| %a<i> := 1; | ||
| %a<j> := 2; | ||
| %a<k> := 3; | ||
| ijk(|%a); |