summaryrefslogtreecommitdiff
path: root/test/files/run/t5568.scala
blob: 14599d9ed245b00f9a88e0172d36b918865f7c57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
object Test {
  def main(args: Array[String]): Unit = {
    // these should give unboxed results
    println(().getClass)
    println(5.getClass)
  	// these should give boxed results
    println(().asInstanceOf[AnyRef with Unit].getClass)
    println(().asInstanceOf[Unit with AnyRef].getClass)
    println(5.asInstanceOf[AnyRef with Int].getClass)
    println(5.asInstanceOf[Int with AnyRef].getClass)
    //make sure ## wasn't broken
    println(5.##)
    println((5.asInstanceOf[AnyRef]).##)
    println((5:Any).##)
  }
}