commit | bfdbe6064d1203fae3b70da76a572d5fc5577ca9 | [log] [tgz] |
---|---|---|
author | Christoffer Quist Adamsen <christofferqa@google.com> | Fri Oct 18 12:03:31 2019 +0200 |
committer | Christoffer Quist Adamsen <christofferqa@google.com> | Fri Oct 18 12:03:31 2019 +0200 |
tree | 49344c07fa0181f7fce4aa0471863abad54df8ac | |
parent | 46be366c34e8506201d0eaef977ff73f6d534c36 [diff] [blame] |
Allow clinits that create a singleton instance to be postponed Bug: 142762129 Change-Id: Iaa472dcf1b52dad304488ed3855fbceb16f20f9d
diff --git a/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java b/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java index 223ff37..7de7a1f 100644 --- a/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java +++ b/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java
@@ -12,6 +12,17 @@ B b = new InterfaceImpl(); b.foo(); + + // Ensure that the instantiations are not dead code eliminated. + escape(a); + escape(b); + } + + @NeverInline + static void escape(Object o) { + if (System.currentTimeMillis() < 0) { + System.out.println(o); + } } public interface A {