Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

continue; statement breaks a loop when used with custom Iterator #11375

Closed
DartBot opened this issue Jun 20, 2013 · 4 comments
Closed

continue; statement breaks a loop when used with custom Iterator #11375

DartBot opened this issue Jun 20, 2013 · 4 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Jun 20, 2013

This issue was originally filed by @orian


What steps will reproduce the problem?

  1. Create a custom Iterator class extending Iterator<>
  2. Create an instance
  3. For loop with if() {continue;}

What is the expected output? What do you see instead?
Iteration over all elements. Iteration until the continue after that the loop is broken.

What version of the product are you using? On what operating system?
0.5.20_r24160, Ubuntu64

Please provide any additional information below.


Attachment:
testproblemwithiterator.dart (564 Bytes)

@DartBot
Copy link
Author

DartBot commented Jun 20, 2013

This comment was originally written by @orian


Ok, I've checked:

  1. the problem is not accessing current,
  2. execution never enters a 'if' statement
    It looks that a loop is interrupted when a if condition is evaluated (is it possible that DartVM treats an if condition value as an for condition value?

@madsager
Copy link
Contributor

Added Area-VM, Triaged labels.

@lrhn
Copy link
Member

lrhn commented Jun 20, 2013

Likely to be same bug as issue #11379.
It was introduced in the same CL (r24088)


Set owner to @kmillikin.
Added Accepted label.

@kmillikin
Copy link

Thanks a lot for the report. Yes, this is the same issue and fixed in SVN r24214.


Added Duplicate label.
Marked as being merged into #11379.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-duplicate Closed in favor of an existing report labels Jun 20, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

4 participants