diff options
Diffstat (limited to 'sources/scalac/typechecker/Analyzer.java')
-rw-r--r-- | sources/scalac/typechecker/Analyzer.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/scalac/typechecker/Analyzer.java b/sources/scalac/typechecker/Analyzer.java index 0787403ce2..5cc9fc81b3 100644 --- a/sources/scalac/typechecker/Analyzer.java +++ b/sources/scalac/typechecker/Analyzer.java @@ -71,8 +71,10 @@ public class Analyzer extends Transformer implements Modifiers, Kinds { assert this.unit == null : "start unit non null for " + unit; this.unit = unit; this.context = context; + ImportList prevImports = context.imports; descr.contexts.put(unit, context); enterSyms(unit.body); + context.imports = prevImports; this.unit = null; this.context = null; } @@ -982,6 +984,8 @@ public class Analyzer extends Transformer implements Modifiers, Kinds { } catch (Type.Error ex) { reportTypeError(tree.pos, ex); tree.type = Type.ErrorType; + if (tree.hasSymbol()) tree.setSymbol(Symbol.ERROR); + return tree; } this.unit = savedUnit; |