File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,9 @@ class ArrayApply extends MiniPhase {
4949 case Apply (_, rc :: Nil ) if ct.symbol == defn.ClassTagModule_apply =>
5050 rc match {
5151 case _ : Literal => true // ClassTag.apply(classOf[XYZ])
52- case rc : RefTree if rc.name == nme.TYPE_ => // ClassTag.apply(java.lang.XYZ.Type)
53- val owner = rc.symbol.maybeOwner.companionModule
54- owner == defn.BoxedBooleanModule || owner == defn.BoxedByteModule ||
55- owner == defn.BoxedShortModule || owner == defn.BoxedCharModule ||
56- owner == defn.BoxedIntModule || owner == defn.BoxedLongModule ||
57- owner == defn.BoxedFloatModule || owner == defn.BoxedDoubleModule ||
58- owner == defn.BoxedUnitModule
52+ case rc : RefTree if rc.name == nme.TYPE_ =>
53+ // ClassTag.apply(java.lang.XYZ.Type)
54+ defn.ScalaBoxedClasses ().contains(rc.symbol.maybeOwner.companionClass)
5955 case _ => false
6056 }
6157 case Apply (ctm : RefTree , _) if ctm.symbol.maybeOwner.companionModule == defn.ClassTagModule =>
You can’t perform that action at this time.
0 commit comments