Clément Béra | 1798f36 | 2023-04-17 08:39:44 +0200 | [diff] [blame] | 1 | // Copyright (c) 2023, 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 enumStatic; |
| 6 | |
| 7 | public class EnumStaticMain { |
| 8 | |
| 9 | enum EnumStatic { |
| 10 | A, |
| 11 | B { |
| 12 | static int i = 17; |
| 13 | |
| 14 | static void print() { |
| 15 | System.out.println("-" + i); |
| 16 | } |
| 17 | |
| 18 | public void virtualPrint() { |
| 19 | print(); |
| 20 | } |
| 21 | }; |
| 22 | |
| 23 | public void virtualPrint() {} |
| 24 | } |
| 25 | |
| 26 | public static void main(String[] args) throws Throwable { |
| 27 | EnumStatic.B.virtualPrint(); |
| 28 | } |
| 29 | } |