File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
3939 if defn.SpecialClassTagClasses .contains(sym) then
4040 classTag.select(sym.name.toTermName)
4141 else
42- classTag.select(nme.apply).appliedToType(tp).appliedTo(clsOf(erasure(tp)))
42+ val clsOfType = erasure(tp) match
43+ case JavaArrayType (elemType) => defn.ArrayOf (elemType)
44+ case etp => etp
45+ classTag.select(nme.apply).appliedToType(tp).appliedTo(clsOf(clsOfType))
4346 tag.withSpan(span)
4447 case tp => EmptyTree
4548 case _ => EmptyTree
Original file line number Diff line number Diff line change 1+ def iarr = IArray (
2+ IArray (1 , 2 , 3 ),
3+ IArray (4 , 5 , 6 ),
4+ IArray (7 , 8 , 9 )
5+ )
6+ def arr = Array ( // same issue
7+ IArray (1 , 2 , 3 ),
8+ Array (4 , 5 , 6 ),
9+ Array (7 , 8 , 9 )
10+ )
You can’t perform that action at this time.
0 commit comments