Updated NON_PUBLIC_CALL_FROM_PUBLIC_INLINE diagnostic to support @PublishedApi
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
// MODULE: m1
|
||||
// FILE: a.kt
|
||||
|
||||
package p
|
||||
|
||||
public class A {
|
||||
@PublishedApi
|
||||
internal val a = A()
|
||||
@PublishedApi
|
||||
internal var v = A()
|
||||
@PublishedApi
|
||||
internal fun a() = A()
|
||||
@PublishedApi
|
||||
internal inner class B
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal val a = A()
|
||||
@PublishedApi
|
||||
internal var v = A()
|
||||
@PublishedApi
|
||||
internal fun a() = A()
|
||||
@PublishedApi
|
||||
internal class B
|
||||
|
||||
// MODULE: m2(m1)
|
||||
// FILE: b.kt
|
||||
|
||||
import p.*
|
||||
|
||||
fun test() {
|
||||
val _a = <!INVISIBLE_MEMBER!>a<!>
|
||||
val _v = <!INVISIBLE_MEMBER!>v<!>
|
||||
<!INVISIBLE_MEMBER!>a<!>()
|
||||
<!INVISIBLE_MEMBER!>B<!>()
|
||||
|
||||
val inst = A()
|
||||
val ia = inst.<!INVISIBLE_MEMBER!>a<!>
|
||||
val iv = inst.<!INVISIBLE_MEMBER!>v<!>
|
||||
inst.<!INVISIBLE_MEMBER!>a<!>()
|
||||
inst.<!INVISIBLE_MEMBER!>B<!>()
|
||||
}
|
||||
|
||||
inline fun testInline() {
|
||||
val _a = <!INVISIBLE_MEMBER!>a<!>
|
||||
val _v = <!INVISIBLE_MEMBER!>v<!>
|
||||
<!INVISIBLE_MEMBER!>a<!>()
|
||||
<!INVISIBLE_MEMBER!>B<!>()
|
||||
|
||||
val inst = A()
|
||||
val ia = inst.<!INVISIBLE_MEMBER!>a<!>
|
||||
val iv = inst.<!INVISIBLE_MEMBER!>v<!>
|
||||
inst.<!INVISIBLE_MEMBER!>a<!>()
|
||||
inst.<!INVISIBLE_MEMBER!>B<!>()
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// -- Module: <m1> --
|
||||
package
|
||||
|
||||
package p {
|
||||
@kotlin.PublishedApi internal val a: p.A
|
||||
@kotlin.PublishedApi internal var v: p.A
|
||||
@kotlin.PublishedApi internal fun a(): p.A
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
@kotlin.PublishedApi internal final val a: p.A
|
||||
@kotlin.PublishedApi internal final var v: p.A
|
||||
@kotlin.PublishedApi internal final fun a(): p.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
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.PublishedApi internal final inner class B {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.PublishedApi internal final class B {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <m2> --
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public inline fun testInline(): kotlin.Unit
|
||||
|
||||
package p {
|
||||
}
|
||||
Reference in New Issue
Block a user