Mads Ager | c6d42df | 2018-07-27 12:38:36 +0200 | [diff] [blame] | 1 | // Copyright (c) 2018 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 | |
| 5 | package assumevalues6; |
| 6 | |
| 7 | public class Assumevalues { |
| 8 | public static int field = 0; |
| 9 | public static int field2 = 2; |
| 10 | public static int field3 = 2; |
| 11 | |
| 12 | public static void main(String[] args) { |
| 13 | if (0 > field) { |
| 14 | System.out.println("NOPE1"); |
| 15 | } |
| 16 | if (field < 0) { |
| 17 | System.out.println("NOPE2"); |
| 18 | } |
| 19 | if (field3 == 0) { |
| 20 | System.out.println("NOPE3"); |
| 21 | } |
| 22 | if (field3 != 0) { |
| 23 | System.out.println("YUP1"); |
| 24 | } |
| 25 | if (2 < field) { |
| 26 | System.out.println("NOPE4"); |
| 27 | } |
| 28 | if (field > 2) { |
| 29 | System.out.println("NOPE5"); |
| 30 | } |
| 31 | if (field2 < field) { |
| 32 | System.out.println("NOPE6"); |
| 33 | } |
| 34 | if (field > field2) { |
| 35 | System.out.println("NOPE7"); |
| 36 | } |
| 37 | if (field <= field2) { |
| 38 | System.out.println("YUP2"); |
| 39 | } |
| 40 | if (field2 >= field) { |
| 41 | System.out.println("YUP3"); |
| 42 | } |
| 43 | System.out.println("OK"); |
| 44 | } |
| 45 | } |