void () { doTest(""" class C { void m() { int local = 0; Object r = new Runnable() { public void run() { } }; for (int loop = 0; loop < 10; loop++) ; try (Resource r = new Resource()) { } try (Resource r = new Resource() { @Override public void close() { } }) { } try (new Resource()) { } } }""", """ PsiJavaFileStub [] IMPORT_LIST:PsiImportListStub CLASS:PsiClassStub[name=C fqn=C] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] METHOD:PsiMethodStub[m:void] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub PARAMETER_LIST:PsiParameterListStub THROWS_LIST:PsiRefListStub[THROWS_LIST:] ANONYMOUS_CLASS:PsiClassStub[anonymous name=null fqn=null baseref=Runnable] METHOD:PsiMethodStub[run:void] MODIFIER_LIST:PsiModifierListStub[mask=1] TYPE_PARAMETER_LIST:PsiTypeParameterListStub PARAMETER_LIST:PsiParameterListStub THROWS_LIST:PsiRefListStub[THROWS_LIST:] ANONYMOUS_CLASS:PsiClassStub[anonymous name=null fqn=null baseref=Resource] METHOD:PsiMethodStub[close:void] MODIFIER_LIST:PsiModifierListStub[mask=1] ANNOTATION:PsiAnnotationStub[@Override] ANNOTATION_PARAMETER_LIST:PsiAnnotationParameterListStubImpl TYPE_PARAMETER_LIST:PsiTypeParameterListStub PARAMETER_LIST:PsiParameterListStub THROWS_LIST:PsiRefListStub[THROWS_LIST:] """); }