Forbid usage of outer's generic parameter in nested class
#KT-1174 In Progress
This commit is contained in:
@@ -19,7 +19,7 @@ class MyIterable<T> : Iterable<T>
|
||||
{
|
||||
override fun iterator(): Iterator<T> = MyIterator()
|
||||
|
||||
class MyIterator : Iterator<T>
|
||||
inner class MyIterator : Iterator<T>
|
||||
{
|
||||
override fun hasNext(): Boolean = false
|
||||
override fun next(): T {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
class Outer<T> {
|
||||
class Nested {
|
||||
fun foo(t: <!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>T<!>) = t
|
||||
}
|
||||
|
||||
class Nested2<T> {
|
||||
fun foo(t: T) = t
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun foo(t: T) = t
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user