void () { Project project = myFixture.getProject(); PsiFile file = myFixture.configureByText("foo.kts", "val q = UByteArray(1).<caret>asList()"); CommonProcessors.CollectUniquesProcessor<KtNamedFunction> processor = new CommonProcessors.CollectUniquesProcessor<>(); KotlinFunctionShortNameIndex.Helper.processElements("asULongArray", project, GlobalSearchScope.allScope(project), processor); Collection<KtNamedFunction> asULongArrayFunctions = ContainerUtil.filter( processor.getResults(), f -> f.getFqName().toString().equals("kotlin.collections.asULongArray") && f.getContainingFile().getVirtualFile().toString().endsWith("_UArrays.kt")); assertFalse(asULongArrayFunctions.isEmpty()); for (KtNamedFunction asULongArrayFunction : asULongArrayFunctions) { KtFile ktFile = (KtFile) asULongArrayFunction.getContainingFile(); AstAccessControl.INSTANCE.testWithControlledAccessToAst( true, file.getVirtualFile(), getProject(), getTestRootDisposable(), new Function0<>() { @Override public Unit invoke() { KotlinFileStubImpl stub = (KotlinFileStubImpl) ktFile.getStub(); assertNotNull(stub); assertEquals("kotlin.collections.UArraysKt", stub.getFacadeFqName().asString()); return Unit.INSTANCE; } }); assertEquals("kotlin.collections", ktFile.getPackageFqName().asString()); } }