blob: 7dba30660586b85b93332e3b5c2fc389ec9613d2 [file] [log] [blame]
Rico Windb8580432018-02-05 15:12:41 +01001// 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 dexsplitsample;
6
7public class Class3 extends Class1 {
Christoffer Quist Adamsene26380962018-07-05 18:08:54 +02008 // Instantiate Class1 to prevent it from being merged into Class3.
9 private static final Class1 obj = new Class1();
10
Rico Windb8580432018-02-05 15:12:41 +010011 public static void main(String[] args) {
12 Class3 clazz = new Class3();
13 if (clazz.getClass1String() != "Class1String") {
14 throw new RuntimeException("Can't call method from super");
15 }
16 if (!new InnerClass().success()) {
17 throw new RuntimeException("Can't call method on inner class");
18 }
19 System.out.println("Class3");
20 }
21
22 private static class InnerClass {
23 public boolean success() {
24 return true;
25 }
26 }
27}