[FIR] Add NO_THIS & INSTANCE_ACCESS_BEFORE_SUPER_CALL
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ interface Iterator<out T> {
|
||||
|
||||
fun <R> map(transform: (element: T) -> R) : Iterator<R> =
|
||||
object : Iterator<R> {
|
||||
override fun next() : R = transform(this@map.<!UNRESOLVED_REFERENCE!>next<!>())
|
||||
override fun next() : R = transform(<!UNRESOLVED_LABEL!>this@map<!>.<!UNRESOLVED_REFERENCE!>next<!>())
|
||||
|
||||
override val hasNext : Boolean
|
||||
// There's no 'this' associated with the map() function, only this of the Iterator class
|
||||
get() = this@map.<!UNRESOLVED_REFERENCE!>hasNext<!>
|
||||
get() = <!UNRESOLVED_LABEL!>this@map<!>.<!UNRESOLVED_REFERENCE!>hasNext<!>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user