[FIR] Add NO_THIS & INSTANCE_ACCESS_BEFORE_SUPER_CALL

This commit is contained in:
Nick
2020-08-17 17:21:46 +03:00
parent 7e1c2cfd36
commit c8f8908a01
86 changed files with 526 additions and 219 deletions
@@ -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<!>
}
}