Unbox enum with subtypes and static members
Bug: b/271385332
Change-Id: Ibbcd19a4f9998d1e49b5b1f0389751053402ea5a
diff --git a/src/test/examplesJava17/enumStatic/EnumStaticMain.java b/src/test/examplesJava17/enumStatic/EnumStaticMain.java
new file mode 100644
index 0000000..6e79499
--- /dev/null
+++ b/src/test/examplesJava17/enumStatic/EnumStaticMain.java
@@ -0,0 +1,29 @@
+// Copyright (c) 2023, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+package enumStatic;
+
+public class EnumStaticMain {
+
+ enum EnumStatic {
+ A,
+ B {
+ static int i = 17;
+
+ static void print() {
+ System.out.println("-" + i);
+ }
+
+ public void virtualPrint() {
+ print();
+ }
+ };
+
+ public void virtualPrint() {}
+ }
+
+ public static void main(String[] args) throws Throwable {
+ EnumStatic.B.virtualPrint();
+ }
+}