Forbid usage of outer's generic parameter in nested class
#KT-1174 In Progress
This commit is contained in:
@@ -19,10 +19,6 @@ class MyIterator<T>(val array : ReadOnlyArray<T>) : javaUtilIterator<T> {
|
||||
trait ReadOnlyArray<out T> : ISized, Iterable<T> {
|
||||
fun get(index : Int) : T
|
||||
|
||||
class Default {
|
||||
fun check(v: Any) = v is T
|
||||
}
|
||||
|
||||
override fun iterator() : Iterator<T> = MyIterator<T>(this)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
class Box<T>() {
|
||||
open class Inner () {
|
||||
open inner class Inner () {
|
||||
fun isT(s : Any) = if(s is T) "OK" else "fail"
|
||||
}
|
||||
|
||||
class Inner2() : Inner() {
|
||||
inner class Inner2() : Inner() {
|
||||
}
|
||||
|
||||
fun inner() = Inner2()
|
||||
|
||||
Reference in New Issue
Block a user