Skip to content

Commit a69d1b3

Browse files
authored
Merge pull request #1344 from dotty-staging/fix/partest-line-numbers
partest: correct line numbers in run stack traces
2 parents 66572df + 00159e6 commit a69d1b3

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

test/test/CompilerTest.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,8 @@ abstract class CompilerTest {
438438
processFileDir(sourceFile, { sf =>
439439
if (extensionsToCopy.contains(sf.extension)) {
440440
dest.parent.jfile.mkdirs
441-
dest.toFile.writeAll("/* ==========================================\n",
442-
" * ========= AUTOMATICALLY GENERATED ========\n",
443-
" * ========= DO NOT EDIT THIS FILE ==========\n",
444-
" * ==========================================\n",
445-
" * Original: " + sf.toString + " */\n\n",
446-
sf.slurp())
441+
dest.toFile.writeAll("/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */",
442+
sf.slurp())
447443
} else {
448444
log(s"WARNING: ignoring $sf")
449445
}

tests/run/origins.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
>> Origins tag 'boop' logged 65 calls from 3 distinguished sources.
33

4-
50 Test$.$anonfun$f3$1(origins.scala:22)
5-
10 Test$.$anonfun$f2$1(origins.scala:21)
6-
5 Test$.$anonfun$f1$1(origins.scala:20)
4+
50 Test$.$anonfun$f3$1(origins.scala:16)
5+
10 Test$.$anonfun$f2$1(origins.scala:15)
6+
5 Test$.$anonfun$f1$1(origins.scala:14)

0 commit comments

Comments
 (0)