KT-4295 Wrong diagnostic about "weaken access privilege" when override properties in constructor
#KT-4295 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
|
||||
package test
|
||||
|
||||
open class Base {
|
||||
protected open val prot = 1
|
||||
internal open val int = 1
|
||||
public open val pub: Int = 1
|
||||
}
|
||||
|
||||
class Child(
|
||||
override val prot: Int,
|
||||
override val int: Int,
|
||||
override val pub: Int
|
||||
) : Base()
|
||||
@@ -0,0 +1,21 @@
|
||||
package test
|
||||
|
||||
internal open class Base {
|
||||
/*primary*/ public constructor Base()
|
||||
internal open val int: kotlin.Int = 1
|
||||
internal open fun <get-int>(): kotlin.Int
|
||||
protected open val prot: kotlin.Int = 1
|
||||
protected open fun <get-prot>(): kotlin.Int
|
||||
public open val pub: kotlin.Int = 1
|
||||
public open fun <get-pub>(): kotlin.Int
|
||||
}
|
||||
|
||||
internal final class Child : test.Base {
|
||||
/*primary*/ public constructor Child(/*0*/ prot: kotlin.Int, /*1*/ int: kotlin.Int, /*2*/ pub: kotlin.Int)
|
||||
internal open override /*1*/ val int: kotlin.Int
|
||||
internal open override /*1*/ fun <get-int>(): kotlin.Int
|
||||
protected open override /*1*/ val prot: kotlin.Int
|
||||
protected open override /*1*/ fun <get-prot>(): kotlin.Int
|
||||
public open override /*1*/ val pub: kotlin.Int
|
||||
public open override /*1*/ fun <get-pub>(): kotlin.Int
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
|
||||
package test
|
||||
|
||||
open class Base {
|
||||
protected open val prot: Int = 1
|
||||
internal open val int: Int = 1
|
||||
public open val pub: Int = 1
|
||||
}
|
||||
|
||||
class Child(
|
||||
public override val prot: Int,
|
||||
public override val int: Int,
|
||||
public override val pub: Int
|
||||
) : Base()
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package test
|
||||
|
||||
internal open class Base {
|
||||
/*primary*/ public constructor Base()
|
||||
internal open val int: kotlin.Int = 1
|
||||
internal open fun <get-int>(): kotlin.Int
|
||||
protected open val prot: kotlin.Int = 1
|
||||
protected open fun <get-prot>(): kotlin.Int
|
||||
public open val pub: kotlin.Int = 1
|
||||
public open fun <get-pub>(): kotlin.Int
|
||||
}
|
||||
|
||||
internal final class Child : test.Base {
|
||||
/*primary*/ public constructor Child(/*0*/ prot: kotlin.Int, /*1*/ int: kotlin.Int, /*2*/ pub: kotlin.Int)
|
||||
public open override /*1*/ val int: kotlin.Int
|
||||
public open override /*1*/ fun <get-int>(): kotlin.Int
|
||||
public open override /*1*/ val prot: kotlin.Int
|
||||
public open override /*1*/ fun <get-prot>(): kotlin.Int
|
||||
public open override /*1*/ val pub: kotlin.Int
|
||||
public open override /*1*/ fun <get-pub>(): kotlin.Int
|
||||
}
|
||||
Reference in New Issue
Block a user