Add/fix extra cases for #KT-41886 Fixed
This commit is contained in:
committed by
teamcity
parent
7d3368da58
commit
76aaecbdf0
+16
-1
@@ -25,7 +25,7 @@ class GrandDerivedFourth : DerivedFourth()
|
||||
open class Marked
|
||||
|
||||
@SubclassOptInRequired(Marker::class)
|
||||
class DerivedMarked : <!OPT_IN_USAGE_ERROR!>Marked<!>()
|
||||
open class DerivedMarked : <!OPT_IN_USAGE_ERROR!>Marked<!>()
|
||||
|
||||
fun test() {
|
||||
val b = Base()
|
||||
@@ -34,3 +34,18 @@ fun test() {
|
||||
val d3 = DerivedThird()
|
||||
val d4 = DerivedFourth()
|
||||
}
|
||||
|
||||
fun test2(b: Base, g: Generic<Base>) {
|
||||
object : <!OPT_IN_USAGE_ERROR!>Base<!>() {}
|
||||
}
|
||||
|
||||
open class Generic<T>
|
||||
|
||||
class DerivedGeneric : Generic<Base>()
|
||||
|
||||
@SubclassOptInRequired(Marker::class)
|
||||
interface BaseInterface
|
||||
|
||||
interface DerivedInterface : <!OPT_IN_USAGE_ERROR!>BaseInterface<!>
|
||||
|
||||
class Delegated(val bi: BaseInterface) : <!OPT_IN_USAGE_ERROR!>BaseInterface<!> by bi
|
||||
|
||||
Reference in New Issue
Block a user