summaryrefslogtreecommitdiff
path: root/test/files/run/t4124.scala
blob: db4e382634f201f589a7cc114624a70c3faa914d (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 xml.Node

object Test extends App {
  val body: Node = <elem>hi</elem>	
  println (((body: AnyRef, "foo"): @unchecked) match {
    case (node: Node, "bar")        => "bye"
    case (ser: Serializable, "foo") => "hi"
  })

  println (((body, "foo"): @unchecked) match {
    case (node: Node, "bar")        => "bye"
    case (ser: Serializable, "foo") => "hi"
  })

  println (((body: AnyRef, "foo"): @unchecked) match {
    case (node: Node, "foo")        => "bye"
    case (ser: Serializable, "foo") => "hi"
  })

  println (((body: AnyRef, "foo"): @unchecked) match {
    case (node: Node, "foo")        => "bye"
    case (ser: Serializable, "foo") => "hi"
  })
}