From 3246c31fe91dfddedc4c10f634e0db654f3276d0 Mon Sep 17 00:00:00 2001 From: gavinking Date: Sat, 16 Jul 2016 23:22:36 +0200 Subject: [PATCH] suppress checks for static inner types for #6373 --- .../typechecker/analyzer/SelfReferenceVisitor.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/typechecker/src/com/redhat/ceylon/compiler/typechecker/analyzer/SelfReferenceVisitor.java b/typechecker/src/com/redhat/ceylon/compiler/typechecker/analyzer/SelfReferenceVisitor.java index b0dd11d4e67..fb1b8c53d35 100644 --- a/typechecker/src/com/redhat/ceylon/compiler/typechecker/analyzer/SelfReferenceVisitor.java +++ b/typechecker/src/com/redhat/ceylon/compiler/typechecker/analyzer/SelfReferenceVisitor.java @@ -74,8 +74,9 @@ private void visitExtendedType( Declaration member = resolveTypeAliases(that.getDeclaration()); - if (member!=null && - isInherited(scope, member)) { + if (member!=null + && !member.isStaticallyImportable() + && isInherited(scope, member)) { Declaration container = (Declaration) member.getContainer(); @@ -143,9 +144,10 @@ private void checkMemberReference( Tree.MemberOrTypeExpression that) { Declaration member = resolveTypeAliases(that.getDeclaration()); - if (member!=null && - isInherited(that.getScope(), member) && - !member.getUnit().getPackage().getModule().isJava()) { + if (member!=null + && !member.isStaticallyImportable() + && isInherited(that.getScope(), member) + && !member.getUnit().getPackage().getModule().isJava()) { Declaration container = (Declaration) member.getContainer();