aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/interop_manifests_are_classtags.scala
blob: 195fac9d99dcb75c4a2bd9a3295582093bb67366 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import scala.reflect.{ClassTag, classTag}

@deprecated("Suppress warnings", since="2.11")
object Test extends dotty.runtime.LegacyApp {
  def classManifestIsClassTag[T: ClassManifest] = {
    println(classTag[T])
    println(Array[T]().toList)
    println(new Array[T](5).toList)
  }

  classManifestIsClassTag[Int]
  classManifestIsClassTag[String]
  classManifestIsClassTag[Array[Int]]

  def manifestIsClassTag[T: Manifest] = {
    println(classTag[T])
    println(Array[T]().toList)
    println(new Array[T](5).toList)
  }

  manifestIsClassTag[Int]
  manifestIsClassTag[String]
  manifestIsClassTag[Array[Int]]
}