aboutsummaryrefslogtreecommitdiff
path: root/tests/run/i1490.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/i1490.scala')
-rw-r--r--tests/run/i1490.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/run/i1490.scala b/tests/run/i1490.scala
new file mode 100644
index 000000000..554bc3940
--- /dev/null
+++ b/tests/run/i1490.scala
@@ -0,0 +1,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)))
+ }
+} \ No newline at end of file