# New Ticket Created by  Bob Rogers 
# Please include the string:  [perl #43869]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=43869 >


   The attached test case illustrates the problem; anything after the
first :flat arg is ignored.  I have a fix, and will commit it as soon as
I have an RT number.

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/

Diffs between last version checked in and current workfile(s):

Index: t/pmc/multisub.t
===================================================================
--- t/pmc/multisub.t    (revision 19701)
+++ t/pmc/multisub.t    (working copy)
@@ -26,7 +26,7 @@
     exports = split " ", "plan ok is"
     test_namespace.export_to(curr_namespace, exports)
 
-    plan( 6 )
+    plan( 8 )
 
     $P0 = new .MultiSub
     $I0 = defined $P0
@@ -44,6 +44,19 @@
     $S0 = foo(42, "goodbye")
     is($S0, "testing 42, goodbye", "int and string variant")
 
+    ## Now test handling of :flat parameters.
+    $P0 = new .ResizablePMCArray
+    push $P0, 42
+    push $P0, "goodbye"
+    $S0 = foo($P0 :flat)
+    is($S0, "testing 42, goodbye", "int and string :flat")
+    $P1 = new .ResizablePMCArray
+    push $P1, 42
+    $P2 = new .ResizablePMCArray
+    push $P2, "goodbye"
+    $S0 = foo($P1 :flat, $P2 :flat)
+    is($S0, "testing 42, goodbye", "int and string double :flat")
+
 .end
 
 .sub foo :multi()
@@ -73,6 +86,17 @@
     .return ($S0)
 .end
 
+.sub foo :multi(Integer, String)
+    .param pmc bar
+    .param pmc baz
+    $S1 = bar
+    $S2 = baz
+    $S0 = "testing " . $S1
+    $S0 .= ", "
+    $S0 .= $S2
+    .return ($S0)
+.end
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 70

End of diffs.

Reply via email to