File tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/util
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,16 +42,16 @@ extends interfaces.SourcePosition with Showable {
42
42
def beforeAndAfterPoint : (List [Int ], List [Int ]) =
43
43
lineOffsets.partition(_ <= point)
44
44
45
- def column : Int = if ( source.content().length != 0 ) source. column(point) else - 1
45
+ def column : Int = source.column(point)
46
46
47
47
def start : Int = span.start
48
- def startLine : Int = if ( source.content().length != 0 ) source. offsetToLine(start) else - 1
49
- def startColumn : Int = if ( source.content().length != 0 ) source. column(start) else - 1
48
+ def startLine : Int = source.offsetToLine(start)
49
+ def startColumn : Int = source.column(start)
50
50
def startColumnPadding : String = source.startColumnPadding(start)
51
51
52
52
def end : Int = span.end
53
- def endLine : Int = if ( source.content().length != 0 ) source. offsetToLine(end) else - 1
54
- def endColumn : Int = if ( source.content().length != 0 ) source. column(end) else - 1
53
+ def endLine : Int = source.offsetToLine(end)
54
+ def endColumn : Int = source.column(end)
55
55
56
56
def withOuter (outer : SourcePosition ): SourcePosition = SourcePosition (source, span, outer)
57
57
def withSpan (range : Span ) = SourcePosition (source, range, outer)
You can’t perform that action at this time.
0 commit comments