blob: 6f594197726fb3851ae23288cb2723e4f1b0aea8 [file] [log] [blame]
Christoffer Quist Adamsen101d2302018-06-12 16:44:10 +02001// Copyright (c) 2018, 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
5package classmerging;
6
7public class SuperCallRewritingTest {
8 public static void main(String[] args) {
9 System.out.println("Calling referencedMethod on SubClassThatReferencesSuperMethod");
Christoffer Quist Adamsenbfdbe602019-10-18 12:03:31 +020010 SubClassThatReferencesSuperMethod obj = new SubClassThatReferencesSuperMethod();
11 System.out.println(obj.referencedMethod());
12
13 // Ensure that the instantiations are not dead code eliminated.
14 escape(obj);
15 }
16
17 @NeverInline
18 static void escape(Object o) {
19 if (System.currentTimeMillis() < 0) {
20 System.out.println(o);
21 }
Christoffer Quist Adamsen101d2302018-06-12 16:44:10 +020022 }
23}