blob: a6283a0c430ac85185d8dc71a059096bcf3dad03 [file] [log] [blame]
clementbera72885972019-05-21 12:30:02 +02001// Copyright (c) 2019, 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
clementberabe19d302019-05-23 17:23:21 +02005package nesthostexample;
clementberad5bd4f32019-05-21 12:22:06 +02006
7public class NestHostInliningSubclasses {
8
9 public static class InnerWithPrivAccess extends NestHostInlining.InnerWithPrivAccess {
10 public String accessSubclass(NestHostInlining host) {
11 return super.access(host) + "Subclass";
12 }
13 }
14
15 public static class InnerNoPrivAccess extends NestHostInlining.InnerNoPrivAccess {
16 @NeverInline
17 public String printSubclass() {
18 return super.print() + "Subclass";
19 }
20 }
21
22 public static void main(String[] args) {
23 System.out.println(new InnerWithPrivAccess().accessSubclass(new NestHostInlining()));
24 System.out.println(new InnerNoPrivAccess().printSubclass());
25 }
26}