File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,8 @@ object ClassTag {
150150 case ObjectTYPE => ClassTag .Object .asInstanceOf [ClassTag [T ]]
151151 case NothingTYPE => ClassTag .Nothing .asInstanceOf [ClassTag [T ]]
152152 case NullTYPE => ClassTag .Null .asInstanceOf [ClassTag [T ]]
153+ case _ if classOf [dotty.runtime.vc.VCPrototype ].isAssignableFrom(runtimeClass1) =>
154+ Class .forName(s " ${runtimeClass1.getName()}$$ " ).newInstance().asInstanceOf [ClassTag [T ]]
153155 case _ => new ClassTag [T ]{ def runtimeClass = runtimeClass1 }
154156 }
155157
Original file line number Diff line number Diff line change @@ -58,7 +58,11 @@ object ScalaRunTime {
5858 // at scala.Array$.fill(Array.scala:281)
5959 // at dotty.tools.dotc.core.Flags$.<init>(Flags.scala:139)
6060 // newInstance throws an exception if the erasure is Void.TYPE. see SI-5680
61+ // TODO: update comment
62+ // Vladimir: this method is used in the process of ClassTag generation in several methods of scala.Array
63+ // ClassTag..MODULE$.apply(ScalaRunTime..MODULE$.arrayClass(ScalaRunTime..MODULE$.arrayClass(evidence$5.runtimeClass()))));
6164 if (clazz == java.lang.Void .TYPE ) classOf [Array [Unit ]]
65+ else if (classOf [dotty.runtime.vc.VCPrototype ].isAssignableFrom(clazz)) ClassTag (clazz).wrap.runtimeClass
6266 else java.lang.reflect.Array .newInstance(clazz, 0 ).getClass
6367 }
6468
You can’t perform that action at this time.
0 commit comments