M201370367 / beanshell2

Automatically exported from code.google.com/p/beanshell2
0 stars 1 forks source link

Do-while loop does not check condition on "continue" #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run this script:
do {
  print ("in the loop");
  if (true) continue;
} while (false);

What is the expected output? What do you see instead?
It should display one line of "in the loop" but it displays endless lines.

What version of the product are you using? On what operating system?
Both bsh-2.0b4 and bsh-2.2b0 (built from trunk revision 98) on openSUSE 11.4 
x64.

Please provide any additional information below.
When running the following java class I get the expected single line:

public class A {
    public static void main (String[] arg) {
        do {
            System.out.println("yes");
            if (true) continue;
        } while (false);
    }
}

Original issue reported on code.google.com by s...@mail.ru on 3 Nov 2011 at 3:07

GoogleCodeExporter commented 9 years ago

Original comment by pejob...@gmail.com on 3 Nov 2011 at 4:19

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r100.

Original comment by `` on 13 Nov 2011 at 11:40

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r102.

Original comment by `` on 13 Nov 2011 at 11:48