Stephan Herhut | d5aa092 | 2017-05-22 16:06:14 +0200 | [diff] [blame] | 1 | // Copyright (c) 2017, 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 | package classmerging; |
| 5 | |
| 6 | class Outer { |
| 7 | |
| 8 | /** |
| 9 | * This class is package private to trigger the generation of bridge methods |
| 10 | * for the visibility change of methods from public subtypes. |
| 11 | */ |
| 12 | class SuperClass { |
| 13 | |
| 14 | public String method() { |
| 15 | return "Method in SuperClass."; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | public class SubClass extends SuperClass { |
| 20 | // Intentionally left empty. |
| 21 | } |
| 22 | |
| 23 | public SubClass getInstance() { |
| 24 | return new SubClass(); |
| 25 | } |
| 26 | } |