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 {
49
49
case Apply (_, rc :: Nil ) if ct.symbol == defn.ClassTagModule_apply =>
50
50
rc match {
51
51
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)
59
55
case _ => false
60
56
}
61
57
case Apply (ctm : RefTree , _) if ctm.symbol.maybeOwner.companionModule == defn.ClassTagModule =>
You can’t perform that action at this time.
0 commit comments