Go through the chain to find implicit receiver

This commit is contained in:
Nikolay Krasko
2012-08-10 21:46:29 +04:00
parent cf6787b798
commit 4c39a49bd1
@@ -118,6 +118,12 @@ public class ChainedScope implements JetScope {
@NotNull
@Override
public ReceiverDescriptor getImplicitReceiver() {
for (JetScope scope : scopeChain) {
if (scope.getImplicitReceiver() != ReceiverDescriptor.NO_RECEIVER) {
return scope.getImplicitReceiver();
}
}
return ReceiverDescriptor.NO_RECEIVER;
}