Updated NON_PUBLIC_CALL_FROM_PUBLIC_INLINE diagnostic to support @PublishedApi
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
// !DIAGNOSTICS: -EXPOSED_PARAMETER_TYPE -NOTHING_TO_INLINE
|
||||
|
||||
|
||||
inline fun call(a: A) {
|
||||
a.<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>test<!>()
|
||||
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>internalFun<!>()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal inline fun callFromPublishedApi(a: A) {
|
||||
a.<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>test<!>()
|
||||
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>internalFun<!>()
|
||||
}
|
||||
|
||||
internal class A {
|
||||
@PublishedApi
|
||||
internal fun test() {
|
||||
test()
|
||||
|
||||
privateFun()
|
||||
|
||||
internalFun()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal fun testInline() {
|
||||
test()
|
||||
|
||||
privateFun()
|
||||
|
||||
internalFun()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun privateFun() {
|
||||
|
||||
}
|
||||
|
||||
internal fun internalFun() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package
|
||||
|
||||
public inline fun call(/*0*/ a: A): kotlin.Unit
|
||||
@kotlin.PublishedApi internal inline fun callFromPublishedApi(/*0*/ a: A): kotlin.Unit
|
||||
internal fun internalFun(): kotlin.Unit
|
||||
private fun privateFun(): kotlin.Unit
|
||||
|
||||
internal final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@kotlin.PublishedApi internal final fun test(): kotlin.Unit
|
||||
@kotlin.PublishedApi internal final fun testInline(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// !DIAGNOSTICS: -EXPOSED_PARAMETER_TYPE -NOTHING_TO_INLINE
|
||||
inline fun call(a: A) {
|
||||
a.test()
|
||||
testTopLevel()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal class A {
|
||||
@PublishedApi
|
||||
internal fun test() {
|
||||
publicFun()
|
||||
internalFun()
|
||||
privateFun()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal inline fun testInline() {
|
||||
publicFun()
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>internalFun<!>()
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@PublishedApi
|
||||
internal fun testTopLevel() {
|
||||
publicFun()
|
||||
internalFun()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
inline internal fun testTopLevelInline() {
|
||||
publicFun()
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>internalFun<!>()
|
||||
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||
}
|
||||
|
||||
fun publicFun() {}
|
||||
|
||||
internal fun internalFun() {}
|
||||
|
||||
private fun privateFun() {}
|
||||
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public inline fun call(/*0*/ a: A): kotlin.Unit
|
||||
internal fun internalFun(): kotlin.Unit
|
||||
private fun privateFun(): kotlin.Unit
|
||||
public fun publicFun(): kotlin.Unit
|
||||
@kotlin.PublishedApi internal fun testTopLevel(): kotlin.Unit
|
||||
@kotlin.PublishedApi internal inline fun testTopLevelInline(): kotlin.Unit
|
||||
|
||||
@kotlin.PublishedApi internal final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@kotlin.PublishedApi internal final fun test(): kotlin.Unit
|
||||
@kotlin.PublishedApi internal final inline fun testInline(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user