getAllExpandedArguments, which is called when one uses pairs( frame.args ), does not process the arguments in order. Under at least one circumstance this breaks existing behavior.
Consider:
{{my_template
top = <ref>Some Ref</ref> |
bottom = <references /> |
}}
In order for this to process correctly, it is required that the argument for top= be parsed before the argument for bottom=. If they are parsed out of order, then the references tag will render as empty because no refs have yet been loaded.
In the current parser, in order processing is reliably performed, but it appears that Lua getAllExpandedArguments can process these arguments in either order. The order used appears to be stable but unpredictable, so that for a given template it will consistently either behave correctly or incorrectly but similarly constructed templates can work differently.
Simply running a for loop over pairs( frame.args ) and exporting the keys will show that the ordering of the keys bears no apparent relationship to the ordering of the input.
A consequence of this bug is discussed at:
http://en.wikipedia.org/wiki/Template_talk:Navbox#Bugs
Version: unspecified
Severity: normal