File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,12 @@ abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Pro
5151 else {
5252 val newpd : this .type =
5353 if (mySpan.isSynthetic) {
54- if (! mySpan.exists && span.exists)
54+ if (! mySpan.exists && span.exists) {
5555 envelope(source, span.startPos) // fill in children spans
56+ () // Note: the `()` is there to prevent some inefficient code from being generated.
57+ // Without it we get an allocation of a span here since the result type of the `if`
58+ // is `Any`, the lub of `Span` and `Unit`.
59+ }
5660 this
5761 }
5862 else cloneIn(source)
Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ object Names {
570570 */
571571 def termName (cs : Array [Char ], offset : Int , len : Int ): SimpleName = synchronized {
572572 util.Stats .record(" termName" )
573- val h = hashValue(cs, offset, len) & (table.size - 1 )
573+ val h = hashValue(cs, offset, len) & (table.length - 1 )
574574
575575 /** Make sure the capacity of the character array is at least `n` */
576576 def ensureCapacity (n : Int ) =
You can’t perform that action at this time.
0 commit comments