diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/util/SourceFile.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/util/SourceFile.scala b/src/compiler/scala/tools/nsc/util/SourceFile.scala index 9a315bc23b..916f625241 100644 --- a/src/compiler/scala/tools/nsc/util/SourceFile.scala +++ b/src/compiler/scala/tools/nsc/util/SourceFile.scala @@ -28,6 +28,9 @@ object SourceFile { class SourceFile(_file : AbstractFile, _content : Array[Char]) { import SourceFile._; + def this(_file: AbstractFile) = { + this(_file, (new String(_file.read())).toCharArray) + } val file = _file; val content = normalize(_content); |