Fix Inliner with nest
- private methods accessed with invokeVirtual/interface
should be inlined
- inlining should rewrite direct calls to virtual/
interface calls
- corresponding tests
Bug:133608609
Change-Id: I84c3b8c01ae899cf81fd4b611e7f72d382ff732a
diff --git a/src/test/examplesJava11/nesthostexample/NestPvtFieldPropagated.java b/src/test/examplesJava11/nesthostexample/NestPvtFieldPropagated.java
new file mode 100644
index 0000000..2cbdf25
--- /dev/null
+++ b/src/test/examplesJava11/nesthostexample/NestPvtFieldPropagated.java
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, 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 nesthostexample;
+
+public class NestPvtFieldPropagated {
+
+ public static class Inner {
+ private static String staticField = "toPropagateStatic";
+ }
+
+ public static void main(String[] args) {
+ System.out.println(Inner.staticField);
+ }
+}