Status: Accepted
Owner: ----
Labels: Type-Bug Priority-High
New issue 284 by christian.plesner.hansen: Assigning and continuing within
a for-in loop behaves unexpectedly
http://code.google.com/p/v8/issues/detail?id=284
Assigning to a variable within a for-in loop containing a continue
statement causes the wrong
value to be stored in the variable. For instance, this function returns 1:
function continueWithinLoop() {
var result;
for (var key in [0]) {
result = "hopla";
continue;
}
return result;
}
This does not seem to affect other types of loops or 'break'. The problem
is not present if the
'result' variable is read immediately after the assignment.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---