void () { final PsiJavaReference ref = (PsiJavaReference)findReferenceAtCaret("var/RefInSuper.java"); final JavaResolveResult resolveResult = ref.advancedResolve(false); assertTrue(resolveResult.isValidResult()); PsiElement currentFileResolveScope = resolveResult.getCurrentFileResolveScope(); assertTrue(currentFileResolveScope instanceof PsiClass); assertEquals("Inner", ((PsiClass)currentFileResolveScope).getName()); PsiElement element = resolveResult.getElement(); assertTrue(element instanceof PsiField); assertEquals("i", ((PsiField)element).getName()); }