'Unsupported' exception replaces with an error
This commit is contained in:
@@ -275,12 +275,14 @@ public class TopDownAnalyzer {
|
|||||||
List<JetImportDirective> importDirectives = namespace.getImportDirectives();
|
List<JetImportDirective> importDirectives = namespace.getImportDirectives();
|
||||||
for (JetImportDirective importDirective : importDirectives) {
|
for (JetImportDirective importDirective : importDirectives) {
|
||||||
if (importDirective.isAbsoluteInRootNamespace()) {
|
if (importDirective.isAbsoluteInRootNamespace()) {
|
||||||
throw new UnsupportedOperationException();
|
trace.getErrorHandler().genericError(namespace.getNode(), "Unsupported by TDA"); // TODO
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if (importDirective.isAllUnder()) {
|
if (importDirective.isAllUnder()) {
|
||||||
JetExpression importedReference = importDirective.getImportedReference();
|
JetExpression importedReference = importDirective.getImportedReference();
|
||||||
if (importedReference != null) {
|
if (importedReference != null) {
|
||||||
JetType type = semanticServices.getTypeInferrerServices(trace, JetFlowInformationProvider.THROW_EXCEPTION).getTypeWithNamespaces(namespaceScope, importedReference, false);
|
JetTypeInferrer.Services typeInferrerServices = semanticServices.getTypeInferrerServices(trace, JetFlowInformationProvider.THROW_EXCEPTION);
|
||||||
|
JetType type = typeInferrerServices.getTypeWithNamespaces(namespaceScope, importedReference, false);
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
namespaceScope.importScope(type.getMemberScope());
|
namespaceScope.importScope(type.getMemberScope());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user