KT-3833 Invoke method not working inside class object?

#KT-3833 Fixed
This commit is contained in:
Svetlana Isakova
2013-09-11 16:26:20 +04:00
parent d50f65634a
commit 5f189a8c0f
3 changed files with 41 additions and 1 deletions
@@ -185,7 +185,7 @@ public class CandidateResolver {
private static boolean checkOuterClassMemberIsAccessible(@NotNull CallCandidateResolutionContext<?> context) {
// In "this@Outer.foo()" the error will be reported on "this@Outer" instead
if (context.call.getExplicitReceiver().exists()) return true;
if (context.call.getExplicitReceiver().exists() || context.call.getThisObject().exists()) return true;
ClassDescriptor candidateThis = getDeclaringClass(context.candidateCall.getCandidateDescriptor());
if (candidateThis == null || candidateThis.getKind().isObject()) return true;