Skip to content

Commit 28e3e32

Browse files
Fix virtual line numbers in assert-stack
When emitting the bytecode, line numbers are emitted for trees. These line numbers are used in call stack frames. Trees inlined from other files get virtual numbers. It appears that, when inlining `call(x)`, the line number for `call` is emitted before that for `x`. So, if `x` is coming from the current file, its line number will be real and will override that of `call`.
1 parent aec1311 commit 28e3e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/run/assert-stack.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
22
Test$.main(assert-stack.scala:7)
33

44
scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
5-
Test$.main(assert-stack.scala:12)
5+
Test$.main(assert-stack.scala:24)
66

0 commit comments

Comments
 (0)