Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 1 | // Copyright (c) 2017, 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 | package assumevalues4; |
| 5 | |
| 6 | public class Assumevalues { |
| 7 | |
| 8 | public static final int ASSUMED_VALUE_0 = 0; |
| 9 | public static final int ASSUMED_VALUE_1 = 1; |
| 10 | public static final long ASSUMED_VALUE_0L = 0; |
| 11 | public static final long ASSUMED_VALUE_1L = 1; |
| 12 | |
| 13 | public static void main(String[] args) { |
| 14 | System.out.println(method0()); |
| 15 | System.out.println(method1()); |
| 16 | System.out.println(method0L() + "L"); |
| 17 | System.out.println(method1L() + "L"); |
| 18 | } |
| 19 | |
| 20 | public static int method0() { |
| 21 | System.out.println("method0"); |
| 22 | return ASSUMED_VALUE_0; |
| 23 | } |
| 24 | |
| 25 | public static int method1() { |
| 26 | System.out.println("method1"); |
| 27 | return ASSUMED_VALUE_1; |
| 28 | } |
| 29 | |
| 30 | public static long method0L() { |
| 31 | System.out.println("method0L"); |
| 32 | return ASSUMED_VALUE_0L; |
| 33 | } |
| 34 | |
| 35 | public static long method1L() { |
| 36 | System.out.println("method1L"); |
| 37 | return ASSUMED_VALUE_1L; |
| 38 | } |
| 39 | } |