Skip to content

Commit

Permalink
Merge pull request #10649 from som-snytt/tweak/array-alloc-test
Browse files Browse the repository at this point in the history
Consolidate tests
  • Loading branch information
lrytz committed Jan 3, 2024
2 parents e09bfc8 + 1c32603 commit c2a8bba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 26 deletions.
8 changes: 5 additions & 3 deletions test/files/run/array-cleanup-optimation-specialized.scala
Expand Up @@ -4,9 +4,11 @@ object Test {
def main(args: Array[String]): Unit = {
assert(apply[String]("") == classOf[Array[String]])
assert(apply[Double](1d) == classOf[Array[Double]])
}

def apply[@specialized(Double) C: ClassTag](c: C): Class[_] = {
Array(c).getClass
assert(applyBound[Double](1d) == classOf[Array[Double]])
}

def apply[@specialized(Double) C: ClassTag](c: C): Class[_] = Array(c).getClass

def applyBound[D <: Double: ClassTag](d: D): Class[_] = Array.apply[D](d).getClass
}
12 changes: 0 additions & 12 deletions test/files/run/sd760a.scala

This file was deleted.

11 changes: 0 additions & 11 deletions test/files/run/sd760b.scala

This file was deleted.

0 comments on commit c2a8bba

Please sign in to comment.