MemberScope (@NotNull PackageViewDescriptor descriptor, @NotNull ModuleDescriptor module) { // See LazyPackageViewDescriptorImpl#memberScope List<MemberScope> scopes = new ArrayList<>(); for (PackageFragmentDescriptor fragment : descriptor.getFragments()) { if (isFromModule(fragment, module)) { scopes.add(fragment.getMemberScope()); } } scopes.add(new SubpackagesScope(module, descriptor.getFqName())); return ChainedMemberScope.Companion.create("test", scopes); }