Skip to content

Commit eaa7f17

Browse files
authored
Merge pull request #1561 from dotty-staging/fix/inline-merge
Fix build failure after merging #1492
2 parents 87a7757 + cee862c commit eaa7f17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import util.{Property, SourceFile, NoSource}
1414
import typer.ErrorReporting._
1515

1616
import scala.annotation.tailrec
17+
import scala.io.Codec
1718

1819
/** Some creators for typed trees */
1920
object tpd extends Trees.Instance[Type] with TypedTreeInfo {
@@ -940,7 +941,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
940941
*/
941942
def sourceFile(call: Tree)(implicit ctx: Context) = {
942943
val file = call.symbol.sourceFile
943-
if (file != null && file.exists) new SourceFile(file) else NoSource
944+
val encoding = ctx.settings.encoding.value
945+
if (file != null && file.exists) new SourceFile(file, Codec(encoding)) else NoSource
944946
}
945947
}
946948

0 commit comments

Comments
 (0)