1// Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file 2// for details. All rights reserved. Use of this source code is governed by a 3// BSD-style license that can be found in the LICENSE file. 4 5package regress2; 6 7public class Regress2 { 8 9 static class X { 10 11 void add() { 12 } 13 } 14 15 static private boolean test() { 16 X x = null; 17 X y = null; 18 19 int a = 5; 20 System.out.println("START"); 21 while (a-- > 0) { 22 System.out.println("LOOP"); 23 int b = 0; 24 switch (b) { 25 case 1: 26 X current = new X(); 27 if (x == null) { 28 x = current; 29 } else { 30 x = null; 31 } 32 y.add(); 33 break; 34 case 2: 35 if (x != null) { 36 x = null; 37 } 38 y.add(); 39 break; 40 } 41 } 42 System.out.println("END"); 43 return true; 44 } 45 46 public static void main(String[] args) { 47 test(); 48 } 49} 50