aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-10-06 15:50:37 +0200
committerGitHub <noreply@github.com>2016-10-06 15:50:37 +0200
commiteaa7f1730aa9da0aa7e4b2c4e86fbcc3acf26131 (patch)
tree687cd3fa6e71f3f5016318ecbc336ce45b42c29d
parent87a775724173bd803a0c4956408e61fd0d5812af (diff)
parentcee862c9f107101cb9b8d16fb5bd18b240272217 (diff)
downloaddotty-eaa7f1730aa9da0aa7e4b2c4e86fbcc3acf26131.tar.gz
dotty-eaa7f1730aa9da0aa7e4b2c4e86fbcc3acf26131.tar.bz2
dotty-eaa7f1730aa9da0aa7e4b2c4e86fbcc3acf26131.zip
Merge pull request #1561 from dotty-staging/fix/inline-merge
Fix build failure after merging #1492
-rw-r--r--src/dotty/tools/dotc/ast/tpd.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala
index 8ba7bc54d..d8db3306c 100644
--- a/src/dotty/tools/dotc/ast/tpd.scala
+++ b/src/dotty/tools/dotc/ast/tpd.scala
@@ -14,6 +14,7 @@ import util.{Property, SourceFile, NoSource}
import typer.ErrorReporting._
import scala.annotation.tailrec
+import scala.io.Codec
/** Some creators for typed trees */
object tpd extends Trees.Instance[Type] with TypedTreeInfo {
@@ -940,7 +941,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
*/
def sourceFile(call: Tree)(implicit ctx: Context) = {
val file = call.symbol.sourceFile
- if (file != null && file.exists) new SourceFile(file) else NoSource
+ val encoding = ctx.settings.encoding.value
+ if (file != null && file.exists) new SourceFile(file, Codec(encoding)) else NoSource
}
}