aboutsummaryrefslogblamecommitdiff
path: root/tests/run/i1490.scala
blob: 554bc3940c17fcb6f3df46aff9160f2759cc059e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                         
class Base {
  type T = Int | Boolean
  def test(x: Object) = x.isInstanceOf[T]
}

object Test {
  def main(args: Array[String]) = {
    val b = new Base
    println(b.test(Int.box(3)))
    println(b.test(Boolean.box(false)))
    println(b.test(Double.box(3.4)))
  }
}