From 24819c2c95944e685e0fb19791ec77bf03263ebe Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 5 Jul 2011 16:47:12 +0400 Subject: [PATCH] 'Unsupported' exception replaces with an error --- .../src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java b/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java index e4761ac25b6..48869941b6c 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java @@ -275,12 +275,14 @@ public class TopDownAnalyzer { List importDirectives = namespace.getImportDirectives(); for (JetImportDirective importDirective : importDirectives) { if (importDirective.isAbsoluteInRootNamespace()) { - throw new UnsupportedOperationException(); + trace.getErrorHandler().genericError(namespace.getNode(), "Unsupported by TDA"); // TODO + continue; } if (importDirective.isAllUnder()) { JetExpression importedReference = importDirective.getImportedReference(); 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) { namespaceScope.importScope(type.getMemberScope()); }