Closed Bug 510021 Opened 16 years ago Closed 15 years ago

VerifyError with early out and for each loops sharing iterator

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P2)

x86
All
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 477133
flash10.1

People

(Reporter: cpeyer, Assigned: jodyer)

Details

Steps to reproduce: early out a function containing the following elements with a return. This is as simple as i could get it. private function _doVerifyError():void { return; var a:Array = []; var o:Object; for each (o in a) { } for each (o in a) { } } Actual Results: function compiles and throws error when called. Expected Results: function does nothing or does not compile. Workaround (if any): - Transferred Comments: Chris Peyer - Tue Aug 11 16:18:24 PDT 2009 this is especially annoying because adding a return at the top of a function is common way to temporarily disable a method during development, and looks very harmless. when infact this is game breaking. Chris Peyer - Tue Aug 11 16:18:56 PDT 2009 From Brent Baker: Confirmed that a verifier error happens if there is a return statement that is not the last statement in the function. This does NOT happen if the return statement is in a conditional block and then is followed by more statements. function _doVerifyError():void{ var o:Object; return; // this will produce a verifier error, delete and recompile to see the other return work if (o == null){ return; // this will not produce a verifier error for each (o in a){} } for each (o in a){} } Tested using asc.jar 8743 Compiler should generate runnable code This bug transferred from: http://bugs.adobe.com/jira/browse/ASC-2833
Actually this is originally https://bugs.adobe.com/jira/browse/ASC-3792 NOT 2833
Component: Tools → Virtual Machine
Flags: in-testsuite?
Flags: flashplayer-qrb?
QA Contact: tools → vm
Assignee: nobody → jodyer
Status: NEW → ASSIGNED
Flags: flashplayer-qrb? → flashplayer-qrb+
Target Milestone: --- → flash10.1
ASC bug?
Priority: -- → P2
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
removing in-testsuite as this is a duplicate and other bug has flag set
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.