Use original field/method signatures in Proguard map
Change-Id: I10013606757b636b370c66fae7667287f43a5c50
diff --git a/src/test/examples/classmerging/ProguardFieldMapTest.java b/src/test/examples/classmerging/ProguardFieldMapTest.java
new file mode 100644
index 0000000..0cbf8a1
--- /dev/null
+++ b/src/test/examples/classmerging/ProguardFieldMapTest.java
@@ -0,0 +1,25 @@
+// Copyright (c) 2018, 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 classmerging;
+
+public class ProguardFieldMapTest {
+
+ public static void main(String[] args) {
+ B b = new B();
+ b.test();
+ }
+
+ public static class A {
+
+ public String f = "A.f";
+ }
+
+ public static class B extends A {
+
+ public void test() {
+ System.out.println(f);
+ }
+ }
+}
diff --git a/src/test/examples/classmerging/ProguardMethodMapTest.java b/src/test/examples/classmerging/ProguardMethodMapTest.java
new file mode 100644
index 0000000..9ce0ad7
--- /dev/null
+++ b/src/test/examples/classmerging/ProguardMethodMapTest.java
@@ -0,0 +1,29 @@
+// Copyright (c) 2018, 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 classmerging;
+
+public class ProguardMethodMapTest {
+
+ public static void main(String[] args) {
+ B b = new B();
+ b.method();
+ }
+
+ public static class A {
+
+ public void method() {
+ System.out.println("In A.method()");
+ }
+ }
+
+ public static class B extends A {
+
+ @Override
+ public void method() {
+ System.out.println("In B.method()");
+ super.method();
+ }
+ }
+}
diff --git a/src/test/examples/classmerging/keep-rules.txt b/src/test/examples/classmerging/keep-rules.txt
index 37a3010..3a70504 100644
--- a/src/test/examples/classmerging/keep-rules.txt
+++ b/src/test/examples/classmerging/keep-rules.txt
@@ -37,6 +37,12 @@
-keep public class classmerging.PinnedParameterTypesTest$TestClass {
public static void method(...);
}
+-keep public class classmerging.ProguardFieldMapTest {
+ public static void main(...);
+}
+-keep public class classmerging.ProguardMethodMapTest {
+ public static void main(...);
+}
-keep public class classmerging.SimpleInterfaceAccessTest {
public static void main(...);
}