Menu

#87 multiple parameters with same name

open
nobody
5
2006-05-31
2006-05-31
No

It's supposed to be a syntax error for a function to
have multiple parameters with the same name.

on foo( a, b, c, a, b ) {
return {a,b,c}};
msg( foo( 1, 2, 3, 4, 5 ) )

Rather than throwing a syntax error, Frontier is happy
to run that code. The result, as shown in the About
Frontier window, is {4,5,3}.

After a few false starts, this bug has been fully
confirmed on the dev mailing list. Apparently the bug
goes all the way back to the beginning, but the
earliest version for which we have confirmation is
5.0.2b10.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB