Files
kotlin-fork/compiler/testData/diagnostics/tests/inline/kt21177.kt
T
Dmitriy Novozhilov 32c3f85679 [FIR] Add inline checker for bodies of inline functions
This checker doesn't support `@PublishedAPI` yet, so some BB tests for it
 were muted. #KT-46270
2021-04-27 18:39:09 +03:00

20 lines
482 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
class SomeContainer {
protected class Limit
protected fun makeLimit(): Limit = TODO()
public inline fun foo(f: () -> Unit) {
<!PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE!>Limit<!>()
<!PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR!>makeLimit<!>()
}
}
open class A protected constructor() {
inline fun foo(f: () -> Unit) {
<!PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE!>A<!>()
}
}