diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-10-06 15:43:33 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-06 15:45:29 +0200 |
commit | cee862c9f107101cb9b8d16fb5bd18b240272217 (patch) | |
tree | 687cd3fa6e71f3f5016318ecbc336ce45b42c29d /src | |
parent | 87a775724173bd803a0c4956408e61fd0d5812af (diff) | |
download | dotty-cee862c9f107101cb9b8d16fb5bd18b240272217.tar.gz dotty-cee862c9f107101cb9b8d16fb5bd18b240272217.tar.bz2 dotty-cee862c9f107101cb9b8d16fb5bd18b240272217.zip |
Fix build failure after merging #1492
The one-parameter constructor of SourceFile was removed in #1494
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/ast/tpd.scala | 4 |
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 } } |