blob: 6f047974b3ffc9874aead0b358f0ac80b4c3fbc5 [file] [log] [blame]
Calin Juravle175dc732015-08-25 15:42:32 +01001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17public class Main extends UnresolvedSuperClass {
18
19 /// CHECK-START: void Main.callInvokeUnresolvedStatic() register (before)
20 /// CHECK: InvokeUnresolved invoke_type:static
21 static public void callInvokeUnresolvedStatic() {
22 UnresolvedClass.staticMethod();
23 }
24
25 /// CHECK-START: void Main.callInvokeUnresolvedVirtual(UnresolvedClass) register (before)
26 /// CHECK: InvokeUnresolved invoke_type:virtual
27 static public void callInvokeUnresolvedVirtual(UnresolvedClass c) {
28 c.virtualMethod();
29 }
30
31 /// CHECK-START: void Main.callInvokeUnresolvedInterface(UnresolvedInterface) register (before)
32 /// CHECK: InvokeUnresolved invoke_type:interface
33 static public void callInvokeUnresolvedInterface(UnresolvedInterface c) {
34 c.interfaceMethod();
35 }
36
37 static public void callInvokeUnresolvedSuper(Main c) {
38 c.superMethod();
39 }
40
41 /// CHECK-START: void Main.superMethod() register (before)
42 /// CHECK: InvokeUnresolved invoke_type:super
43 public void superMethod() {
44 super.superMethod();
45 }
46
47 /// CHECK-START: void Main.main(java.lang.String[]) register (before)
48 /// CHECK: InvokeUnresolved invoke_type:direct
49 static public void main(String[] args) {
50 UnresolvedClass c = new UnresolvedClass();
51 callInvokeUnresolvedStatic();
52 callInvokeUnresolvedVirtual(c);
53 callInvokeUnresolvedInterface(c);
54 callInvokeUnresolvedSuper(new Main());
55 }
56}