Revert "FIR: make both ImplicitReceiverStack.get implementations consistent"

This reverts commit b058ca635c.

Change is not necessary anymore since there are no kinds for implicit
receivers
This commit is contained in:
Denis Zharkov
2020-05-08 14:55:39 +03:00
parent 808355d817
commit 288db4fb1c
@@ -51,14 +51,8 @@ class PersistentImplicitReceiverStack private constructor(
}
override operator fun get(name: String?): ImplicitReceiverValue<*>? {
if (name == null) {
return stack.lastOrNull {
it !is ImplicitDispatchReceiverValue || !it.inDelegated
}
}
return indexesPerLabel[Name.identifier(name)].lastOrNull()?.let { stack[it] }?.takeIf {
it !is ImplicitDispatchReceiverValue || !it.inDelegated
}
if (name == null) return stack.lastOrNull()
return indexesPerLabel[Name.identifier(name)].lastOrNull()?.let { stack[it] }
}
override fun lastDispatchReceiver(): ImplicitDispatchReceiverValue? {