summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2011-06-29 10:30:44 +0000
committerIulian Dragos <jaguarul@gmail.com>2011-06-29 10:30:44 +0000
commitd7cc1621327e092edf59a394b10c106e4312957c (patch)
tree5c21f33b905237efbbeebad817be9dc48e32b232
parente365b51c0441bb6dbbe4107481f36993d0f285ec (diff)
downloadscala-d7cc1621327e092edf59a394b10c106e4312957c.tar.gz
scala-d7cc1621327e092edf59a394b10c106e4312957c.tar.bz2
scala-d7cc1621327e092edf59a394b10c106e4312957c.zip
Use the correct encoding in the browsing loader...
Use the correct encoding in the browsing loader for the presentation compiler. This should be backported to 2.9 and 2.8. no review.
-rw-r--r--src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
index 13dba172db..390342cc06 100644
--- a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
+++ b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
@@ -92,7 +92,7 @@ abstract class BrowsingLoaders extends SymbolLoaders {
}
// System.out.println("Browsing "+src)
- val source = new BatchSourceFile(src)
+ val source = getSourceFile(src) // this uses the current encoding
val body = new OutlineParser(source).parse()
// System.out.println(body)
val browser = new BrowserTraverser
@@ -111,7 +111,7 @@ abstract class BrowsingLoaders extends SymbolLoaders {
browseTopLevel(root, src)
} catch {
case ex: syntaxAnalyzer.MalformedInput =>
- println("caught malformed input exception at offset "+ex.offset+": "+ex.msg)
+ println("[%s] caught malformed input exception at offset %d: %s".format(src, ex.offset, ex.msg))
super.enterToplevelsFromSource(root, name, src)
}
}