Christoffer Quist Adamsen | 8c92122 | 2018-07-11 13:33:56 +0200 | [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 classmerging; |
| 6 | |
| 7 | public class NestedDefaultInterfaceMethodsTest { |
| 8 | |
| 9 | public static void main(String[] args) { |
| 10 | new C().m(); |
| 11 | } |
| 12 | |
| 13 | public interface A { |
| 14 | |
| 15 | default void m() { |
| 16 | System.out.println("In A.m()"); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | public interface B extends A { |
| 21 | |
| 22 | @Override |
| 23 | default void m() { |
| 24 | System.out.println("In B.m()"); |
| 25 | A.super.m(); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | public static class C implements B { |
| 30 | |
| 31 | @Override |
| 32 | public void m() { |
| 33 | System.out.println("In C.m()"); |
| 34 | B.super.m(); |
| 35 | } |
| 36 | } |
| 37 | } |