File tree 2 files changed +7
-1
lines changed
sbt-dotty/sbt-test/compilerReporter/simple/project
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public Optional<String> sourcePath() {
88
88
else return Optional .ofNullable (src .file ().path ());
89
89
}
90
90
public Optional <Integer > line () {
91
- int line = pos .line ();
91
+ int line = pos .line () + 1 ;
92
92
if (line == -1 ) return Optional .empty ();
93
93
else return Optional .of (line );
94
94
}
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ object Reporter {
29
29
println(problems.toList)
30
30
assert(problems.size == 1 )
31
31
32
+ // make sure position reported by zinc are proper
33
+ val mainProblem = problems.head
34
+ val line = mainProblem.position().line()
35
+ assert(line.isPresent() == true )
36
+ assert(line.get() == 9 )
37
+
32
38
// Assert disabled because we don't currently pass positions to sbt
33
39
// See https://github.com/lampepfl/dotty/pull/2107
34
40
// assert(problems.forall(_.position.offset.isDefined))
You can’t perform that action at this time.
0 commit comments