@@ -33,7 +33,7 @@ trait MessageRendering {
33
33
*/
34
34
def outer (pos : SourcePosition , prefix : String )(implicit ctx : Context ): List [String ] =
35
35
if (pos.outer.exists)
36
- i " $prefix| This location is in code that was inlined at ${ pos.outer} " ::
36
+ i " $prefix| This location is in code that was inlined at $pos" ::
37
37
outer(pos.outer, prefix)
38
38
else Nil
39
39
@@ -149,9 +149,10 @@ trait MessageRendering {
149
149
val posString = posStr(pos, diagnosticLevel, msg)
150
150
if (posString.nonEmpty) sb.append(posString).append(EOL )
151
151
if (pos.exists && pos.source.file.exists) {
152
- val (srcBefore, srcAfter, offset) = sourceLines(pos, diagnosticLevel)
153
- val marker = columnMarker(pos, offset, diagnosticLevel)
154
- val err = errorMsg(pos, msg.msg, offset)
152
+ val pos1 = pos.nonInlined
153
+ val (srcBefore, srcAfter, offset) = sourceLines(pos1, diagnosticLevel)
154
+ val marker = columnMarker(pos1, offset, diagnosticLevel)
155
+ val err = errorMsg(pos1, msg.msg, offset)
155
156
sb.append((srcBefore ::: marker :: err :: outer(pos, " " * (offset - 1 )) ::: srcAfter).mkString(EOL ))
156
157
}
157
158
else sb.append(msg.msg)
0 commit comments