blob: b28433d5cf6fea294ac14c9f4cb38b073c71cd42 [file] [log] [blame]
Christoffer Quist Adamsen722c9f62018-07-04 16:23:25 +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.
4package classmerging;
5
6public class ClassWithNativeMethodTest {
7
8 public static void main(String[] args) {
9 B obj = new B();
10
11 // Make sure that A.method is not removed by tree shaking.
12 if (args.length == 42) {
13 obj.method();
14 }
15 }
16
17 public static class A {
18 public native void method();
19 }
20
21 public static class B extends A {}
22}