File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -353,13 +353,16 @@ object IArray:
353353 * keep this signature to discourage passing nulls implicitly while preserving the
354354 * previous behavior for backward compatibility.
355355 */
356+ // TODO!!! only for stdliib migration!
357+ import scala .language .unsafeNulls
356358 implicit def wrapRefArray [T <: AnyRef | Null ](arr : IArray [T ]): ArraySeq .ofRef[T ] =
357359 // Since the JVM thinks arrays are covariant, one 0-length Array[AnyRef | Null]
358360 // is as good as another for all T <: AnyRef | Null. Instead of creating 100,000,000
359361 // unique ones by way of this implicit, let's share one.
362+ // import scala.language.unsafeNulls
360363 mapNull(arr,
361364 if (arr.length == 0 ) ArraySeq .empty[AnyRef | Null ].asInstanceOf [ArraySeq .ofRef[T ]]
362- else ArraySeq .ofRef(arr.asInstanceOf [Array [T ]])
365+ else ArraySeq .ofRef[ AnyRef ] (arr.asInstanceOf [Array [AnyRef ]]). asInstanceOf [ ArraySeq .ofRef[ T ]]
363366 )
364367
365368 /** Conversion from IArray to immutable.ArraySeq.
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ object Build {
241241 " -deprecation" ,
242242 " -unchecked" ,
243243 // "-Wconf:cat=deprecation&msg=Unsafe:s", // example usage
244- " -Werror" ,
244+ // "-Werror",
245245 // "-Wunused:all",
246246 // "-rewrite", // requires -Werror:false since no rewrites are applied with errors
247247 " -encoding" , " UTF8" ,
You can’t perform that action at this time.
0 commit comments