@@ -33,7 +33,7 @@ trait MessageRendering {
3333 */
3434 def outer (pos : SourcePosition , prefix : String )(implicit ctx : Context ): List [String ] =
3535 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" ::
3737 outer(pos.outer, prefix)
3838 else Nil
3939
@@ -149,9 +149,10 @@ trait MessageRendering {
149149 val posString = posStr(pos, diagnosticLevel, msg)
150150 if (posString.nonEmpty) sb.append(posString).append(EOL )
151151 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)
155156 sb.append((srcBefore ::: marker :: err :: outer(pos, " " * (offset - 1 )) ::: srcAfter).mkString(EOL ))
156157 }
157158 else sb.append(msg.msg)
0 commit comments