Search in sources :

Example 1 with KtTreeVisitorVoid

use of org.jetbrains.kotlin.psi.KtTreeVisitorVoid in project kotlin by JetBrains.

the class AbstractPsiCheckerTest method checkResolveToDescriptor.

void checkResolveToDescriptor() {
    KtFile file = (KtFile) myFixture.getFile();
    file.accept(new KtTreeVisitorVoid() {

        @Override
        public void visitDeclaration(@NotNull KtDeclaration dcl) {
            if (areDescriptorsCreatedForDeclaration(dcl)) {
                // check for exceptions
                ResolutionUtils.resolveToDescriptor(dcl, BodyResolveMode.FULL);
            }
            dcl.acceptChildren(this, null);
        }
    });
}
Also used : KtDeclaration(org.jetbrains.kotlin.psi.KtDeclaration) KtTreeVisitorVoid(org.jetbrains.kotlin.psi.KtTreeVisitorVoid) KtFile(org.jetbrains.kotlin.psi.KtFile)

Aggregations

KtDeclaration (org.jetbrains.kotlin.psi.KtDeclaration)1 KtFile (org.jetbrains.kotlin.psi.KtFile)1 KtTreeVisitorVoid (org.jetbrains.kotlin.psi.KtTreeVisitorVoid)1