| // Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| fun processObject(obj: Any, func: (Any) -> Unit) { |
| fun printObject(obj: Any) { |
| fun invokeInlinedFunctions() { |
| inline fun inlinedA(f: () -> Unit) { |
| inline fun inlinedB(f: () -> Unit) { |
| fun foo(a: Int, b: Int) { |
| fun emptyMethod(unused: Int) { |
| fun testNestedInlining() { |
| inline fun inlinee1(a: Int, b: Int) { |
| inline fun inlinee2(p: Int, block: () -> Unit) { |
| @JvmStatic fun main(args: Array<String>) { |
| val instance = KotlinInline() |
| instance.processObject(instance, instance::printObject) |
| instance.invokeInlinedFunctions() |
| instance.testNestedInlining() |