blob: 7a0e3256558b7b633be2852bd8908734cc1396a8 [file] [log] [blame]
Christoffer Quist Adamsen8c921222018-07-11 13:33:56 +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 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}