Variance checker: add check for nested local / anonymous classes
So #KT-16136 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
9dd217eee3
commit
b66401a41d
@@ -0,0 +1,26 @@
|
||||
class C<T> {
|
||||
private val blah = object {
|
||||
fun foo(): T = TODO()
|
||||
}
|
||||
|
||||
fun bar(x: T) {}
|
||||
}
|
||||
|
||||
class CC<T> {
|
||||
fun some(a: Any = object {
|
||||
fun bar(): T = TODO()
|
||||
}) {}
|
||||
|
||||
fun baz(arg: T) {}
|
||||
}
|
||||
|
||||
interface G
|
||||
|
||||
class CCC<T> : G by object : G {
|
||||
fun some(a: Any = object {
|
||||
fun bar(): T = null!!
|
||||
}) {}
|
||||
} {
|
||||
fun baz(arg: T) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user