Fix imports from objects
This almost reverts 345ecbf, since now properties are no longer created for
objects
This commit is contained in:
+1
-7
@@ -22,7 +22,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.utils.Printer;
|
||||
|
||||
@@ -203,14 +202,9 @@ public abstract class WritableScopeWithImports extends JetScopeAdapter implement
|
||||
public void importClassifierAlias(@NotNull Name importedClassifierName, @NotNull ClassifierDescriptor classifierDescriptor) {
|
||||
checkMayWrite();
|
||||
|
||||
if (DescriptorUtils.isSingleton(classifierDescriptor)) {
|
||||
throw new IllegalStateException("must not be object: " + classifierDescriptor);
|
||||
}
|
||||
|
||||
getCurrentIndividualImportScope().addClassifierAlias(importedClassifierName, classifierDescriptor);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void importNamespaceAlias(@NotNull Name aliasName, @NotNull NamespaceDescriptor namespaceDescriptor) {
|
||||
checkMayWrite();
|
||||
|
||||
Reference in New Issue
Block a user