summaryrefslogtreecommitdiff
path: root/test/files/pos/t5317.scala
diff options
context:
space:
mode:
authoraleksandar <aleksandar@lampmac14.epfl.ch>2012-01-12 15:38:55 +0100
committeraleksandar <aleksandar@lampmac14.epfl.ch>2012-01-12 15:38:55 +0100
commit91fcdf64d406aed26d473091c3328c0cf089e115 (patch)
treee3897d0cc6b680d32581a740b16a4ad5ef0839ef /test/files/pos/t5317.scala
parent51ddeb372b3f0b22041d9a51f3faee17acd7b749 (diff)
parent5f5029d2ac6348ecb07fc11f6656621c662ced92 (diff)
downloadscala-91fcdf64d406aed26d473091c3328c0cf089e115.tar.gz
scala-91fcdf64d406aed26d473091c3328c0cf089e115.tar.bz2
scala-91fcdf64d406aed26d473091c3328c0cf089e115.zip
Merge branch 'master' into issue/4147
Conflicts: .gitignore
Diffstat (limited to 'test/files/pos/t5317.scala')
-rw-r--r--test/files/pos/t5317.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t5317.scala b/test/files/pos/t5317.scala
new file mode 100644
index 0000000000..8c9c9d8222
--- /dev/null
+++ b/test/files/pos/t5317.scala
@@ -0,0 +1,12 @@
+object Test {
+ trait S { type T; val x: AnyRef }
+ trait A extends S { type T <: A; val x: A = null }
+ trait B extends S { type T <: B; val x: B = null }
+
+ val a = new A{}
+ val b = new B{}
+ val y = if (true) a else b
+
+ // lub of y should allow for this
+ println(y.x.x)
+}