diff options
Diffstat (limited to 'sources/scalac/symtab/SourceCompleter.java')
-rw-r--r-- | sources/scalac/symtab/SourceCompleter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/scalac/symtab/SourceCompleter.java b/sources/scalac/symtab/SourceCompleter.java index fad727cfac..cb44daeea8 100644 --- a/sources/scalac/symtab/SourceCompleter.java +++ b/sources/scalac/symtab/SourceCompleter.java @@ -8,6 +8,7 @@ package scalac.symtab; +import scala.tools.util.AbstractFile; import scala.tools.util.SourceFile; import scalac.*; @@ -33,8 +34,9 @@ public class SourceCompleter extends SymbolLoader { /** complete class symbol c by loading the unit */ public String doComplete(Symbol clasz) throws IOException { - File file = global.classPath.openJavaFile( + AbstractFile file = global.classPath.openFile( SourceRepresentation.externalizeFileName(clasz, ".scala")); + if (!file.exists()) throw new FileNotFoundException(file.getPath()); Unit unit = new Unit(global, new SourceFile(file), false, mixinOnly); Phase phase = global.currentPhase; global.currentPhase = global.PHASE.PARSER.phase(); |