diag in DeclarationResolver
This commit is contained in:
@@ -277,6 +277,11 @@ public class DeclarationResolver {
|
|||||||
if (declarationDescriptor instanceof NamespaceDescriptor) {
|
if (declarationDescriptor instanceof NamespaceDescriptor) {
|
||||||
final NamespaceDescriptor namespace = (NamespaceDescriptor)declarationDescriptor;
|
final NamespaceDescriptor namespace = (NamespaceDescriptor)declarationDescriptor;
|
||||||
Collection<JetFile> files = trace.get(BindingContext.NAMESPACE_TO_FILES, namespace);
|
Collection<JetFile> files = trace.get(BindingContext.NAMESPACE_TO_FILES, namespace);
|
||||||
|
|
||||||
|
if (files == null) {
|
||||||
|
throw new IllegalStateException("declarations corresponding to " + namespace + " are not found");
|
||||||
|
}
|
||||||
|
|
||||||
declarations = Collections2.transform(files, new Function<JetFile, PsiElement>() {
|
declarations = Collections2.transform(files, new Function<JetFile, PsiElement>() {
|
||||||
@Override
|
@Override
|
||||||
public PsiElement apply(@Nullable JetFile file) {
|
public PsiElement apply(@Nullable JetFile file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user