forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scala#9641 from som-snytt/issue/12403
Fix `ArrayOps` bugs (by avoiding using `ArraySeq#array`, which does not guarantee element type)
- Loading branch information
Showing
3 changed files
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
object Test extends App { | ||
val xs = | ||
Array.empty[Double] | ||
val ys = | ||
Array(0.0) | ||
assert(xs.intersect(ys).getClass.getComponentType == classOf[Double]) | ||
assert(Array.empty[Double].intersect(Array(0.0)).getClass.getComponentType == classOf[Double]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters