FE 1.0: introduce PrivateInFile effective visibility #KT-20094 Fixed
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
class Public {
|
||||
private open class NestedPrivate
|
||||
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>test1<!>() = NestedPrivate()
|
||||
fun test2(<!EXPOSED_PARAMETER_TYPE!>p: NestedPrivate<!>) {}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>NestedPrivate<!>.test3() {}
|
||||
val <!EXPOSED_PROPERTY_TYPE!>test4<!> = NestedPrivate()
|
||||
class Test5 : <!EXPOSED_SUPER_CLASS!>NestedPrivate<!>()
|
||||
}
|
||||
|
||||
private class PrivateInFileClass {
|
||||
private open class NestedPrivate
|
||||
|
||||
fun test1() = NestedPrivate()
|
||||
fun test2(p: NestedPrivate) {}
|
||||
fun NestedPrivate.test3() {}
|
||||
val test4 = NestedPrivate()
|
||||
class Test5 : NestedPrivate()
|
||||
}
|
||||
|
||||
private interface PrivateInFile {
|
||||
private class Private
|
||||
|
||||
fun expose() = Private()
|
||||
}
|
||||
|
||||
// Exposes 'PrivateInFile$Private' via 'expose'
|
||||
class Derived : PrivateInFile
|
||||
@@ -0,0 +1,28 @@
|
||||
class Public {
|
||||
private open class NestedPrivate
|
||||
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>test1<!>() = NestedPrivate()
|
||||
fun test2(<!EXPOSED_PARAMETER_TYPE!>p: NestedPrivate<!>) {}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>NestedPrivate<!>.test3() {}
|
||||
val <!EXPOSED_PROPERTY_TYPE!>test4<!> = NestedPrivate()
|
||||
class Test5 : <!EXPOSED_SUPER_CLASS!>NestedPrivate()<!>
|
||||
}
|
||||
|
||||
private class PrivateInFileClass {
|
||||
private open class NestedPrivate
|
||||
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>test1<!>() = NestedPrivate()
|
||||
fun test2(<!EXPOSED_PARAMETER_TYPE!>p: NestedPrivate<!>) {}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>NestedPrivate<!>.test3() {}
|
||||
val <!EXPOSED_PROPERTY_TYPE!>test4<!> = NestedPrivate()
|
||||
class Test5 : <!EXPOSED_SUPER_CLASS!>NestedPrivate()<!>
|
||||
}
|
||||
|
||||
private interface PrivateInFile {
|
||||
private class Private
|
||||
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>expose<!>() = Private()
|
||||
}
|
||||
|
||||
// Exposes 'PrivateInFile$Private' via 'expose'
|
||||
class Derived : PrivateInFile
|
||||
@@ -0,0 +1,73 @@
|
||||
package
|
||||
|
||||
public final class Derived : PrivateInFile {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun expose(): PrivateInFile.Private
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
private interface PrivateInFile {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun expose(): PrivateInFile.Private
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
private final class Private {
|
||||
public constructor Private()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
private final class PrivateInFileClass {
|
||||
public constructor PrivateInFileClass()
|
||||
public final val test4: PrivateInFileClass.NestedPrivate
|
||||
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 final fun test1(): PrivateInFileClass.NestedPrivate
|
||||
public final fun test2(/*0*/ p: PrivateInFileClass.NestedPrivate): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun PrivateInFileClass.NestedPrivate.test3(): kotlin.Unit
|
||||
|
||||
private open class NestedPrivate {
|
||||
public constructor NestedPrivate()
|
||||
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
|
||||
}
|
||||
|
||||
public final class Test5 : PrivateInFileClass.NestedPrivate {
|
||||
public constructor Test5()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
public final class Public {
|
||||
public constructor Public()
|
||||
public final val test4: Public.NestedPrivate
|
||||
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 final fun test1(): Public.NestedPrivate
|
||||
public final fun test2(/*0*/ p: Public.NestedPrivate): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun Public.NestedPrivate.test3(): kotlin.Unit
|
||||
|
||||
private open class NestedPrivate {
|
||||
public constructor NestedPrivate()
|
||||
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
|
||||
}
|
||||
|
||||
public final class Test5 : Public.NestedPrivate {
|
||||
public constructor Test5()
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user