diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-01 19:10:48 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | 617be516b261524c2f0762de10f2bde376043ad7 (patch) | |
tree | 093df00ecbb02bfe5b06b2040fad953a613b4f20 /src/dotty/tools/dotc/core/Contexts.scala | |
parent | faba2b7999bf73bf10116b391efbdd751054ead0 (diff) | |
download | dotty-617be516b261524c2f0762de10f2bde376043ad7.tar.gz dotty-617be516b261524c2f0762de10f2bde376043ad7.tar.bz2 dotty-617be516b261524c2f0762de10f2bde376043ad7.zip |
Print inlining positions in error messages
Error messages now print the inlined positions as well
as the position of the inlined call, recursively.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index ea0ab95e6..f2a1fe53e 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -370,12 +370,8 @@ object Contexts { /** The current source file; will be derived from current * compilation unit. */ - def source: SourceFile = { - val file = Inliner.inlinedSource - if (file.exists) file - else if (compilationUnit == null) NoSource - else compilationUnit.source - } + def source: SourceFile = + if (compilationUnit == null) NoSource else compilationUnit.source /** Does current phase use an erased types interpretation? */ def erasedTypes: Boolean = phase.erasedTypes |