Rico Wind | b858043 | 2018-02-05 15:12:41 +0100 | [diff] [blame] | 1 | // 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 | |
| 5 | package dexsplitsample; |
| 6 | |
| 7 | public class Class3 extends Class1 { |
Christoffer Quist Adamsen | e2638096 | 2018-07-05 18:08:54 +0200 | [diff] [blame] | 8 | // Instantiate Class1 to prevent it from being merged into Class3. |
| 9 | private static final Class1 obj = new Class1(); |
| 10 | |
Rico Wind | b858043 | 2018-02-05 15:12:41 +0100 | [diff] [blame] | 11 | 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 | } |