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:
353
353
* keep this signature to discourage passing nulls implicitly while preserving the
354
354
* previous behavior for backward compatibility.
355
355
*/
356
+ // TODO!!! only for stdliib migration!
357
+ import scala .language .unsafeNulls
356
358
implicit def wrapRefArray [T <: AnyRef | Null ](arr : IArray [T ]): ArraySeq .ofRef[T ] =
357
359
// Since the JVM thinks arrays are covariant, one 0-length Array[AnyRef | Null]
358
360
// is as good as another for all T <: AnyRef | Null. Instead of creating 100,000,000
359
361
// unique ones by way of this implicit, let's share one.
362
+ // import scala.language.unsafeNulls
360
363
mapNull(arr,
361
364
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 ]]
363
366
)
364
367
365
368
/** Conversion from IArray to immutable.ArraySeq.
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ object Build {
238
238
" -deprecation" ,
239
239
" -unchecked" ,
240
240
// "-Wconf:cat=deprecation&msg=Unsafe:s", // example usage
241
- " -Werror" ,
241
+ // "-Werror",
242
242
// "-Wunused:all",
243
243
// "-rewrite", // requires -Werror:false since no rewrites are applied with errors
244
244
" -encoding" , " UTF8" ,
You can’t perform that action at this time.
0 commit comments