File tree 2 files changed +14
-1
lines changed
compiler/src/dotty/tools/dotc/typer
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):
39
39
if defn.SpecialClassTagClasses .contains(sym) then
40
40
classTag.select(sym.name.toTermName)
41
41
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))
43
46
tag.withSpan(span)
44
47
case tp => EmptyTree
45
48
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