File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
compiler/src/dotty/tools/dotc/rewrites Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ object Rewrites {
4343 pbuf.filterInPlace(x => ! p(x.span))
4444
4545 def apply (cs : Array [Char ]): Array [Char ] = {
46- val delta = pbuf.map (_.delta).sum
47- val patches = pbuf.toList.sortBy (_.span.start)
46+ val patches = pbuf.toList.distinct.sortBy (_.span.start)
47+ val delta = patches.map (_.delta).sum
4848 if (patches.nonEmpty)
4949 patches.reduceLeft {(p1, p2) =>
5050 assert(p1.span.end <= p2.span.start, s " overlapping patches in $source: $p1 and $p2" )
Original file line number Diff line number Diff line change 1+ def Test =
2+ try ()
3+ catch {
4+ case x: Throwable if x.getMessage `contains` "error" => ???
5+ }
Original file line number Diff line number Diff line change 1+ def Test =
2+ try ()
3+ catch {
4+ case x : Throwable if x.getMessage contains " error" => ???
5+ }
You can’t perform that action at this time.
0 commit comments