Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnu-liguobin committed Mar 19, 2021
1 parent 306db60 commit ec6676b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/scala/tools/nsc/transform/CleanUp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ abstract class CleanUp extends Statics with Transform with ast.TreeDSL {
// See scala/bug#12201, should be rewrite as Primitive Array.
// Match Array
case Apply(appMeth @ Select(appMethQual, _), Apply(wrapRefArrayMeth, StripCast(ArrayValue(elemtpt, elems)) :: Nil) :: _ :: Nil)
if appMethQual.symbol.getterName == TermName("Array") && treeInfo.isQualifierSafeToElide(appMethQual) && currentRun.runDefinitions.primitiveWrapArrayMethod.contains(wrapRefArrayMeth.symbol) =>
if appMethQual.hasSymbolField && appMethQual.symbol.getterName == TermName("Array") && treeInfo.isQualifierSafeToElide(appMethQual) && currentRun.runDefinitions.primitiveWrapArrayMethod.contains(wrapRefArrayMeth.symbol) =>
localTyper.typedPos(elemtpt.pos) {
ArrayValue(TypeTree(elemtpt.tpe), elems)
} transform this
Expand Down

0 comments on commit ec6676b

Please sign in to comment.