summaryrefslogtreecommitdiff
path: root/test/files/neg/t6042.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-07-08 14:51:12 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-07-08 16:30:10 +0200
commitda587e31782ecbad27bd9d9247100b3ac1827b11 (patch)
tree8518630f7058f3a0387bb0ecdcb63fb23d85ac8d /test/files/neg/t6042.scala
parentf2dbe673756302d5f5824fd8d0e6e3b3eb45a57b (diff)
downloadscala-da587e31782ecbad27bd9d9247100b3ac1827b11.tar.gz
scala-da587e31782ecbad27bd9d9247100b3ac1827b11.tar.bz2
scala-da587e31782ecbad27bd9d9247100b3ac1827b11.zip
SI-6042 Improve type selection from volatile type error
- Display the type of the typed qualifier (qual1), to avoid the message "Illegal type selection from volatile type null". - Show the upper bound, which is used to calculate the volatility.
Diffstat (limited to 'test/files/neg/t6042.scala')
-rw-r--r--test/files/neg/t6042.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/neg/t6042.scala b/test/files/neg/t6042.scala
new file mode 100644
index 0000000000..5a123d17ca
--- /dev/null
+++ b/test/files/neg/t6042.scala
@@ -0,0 +1,8 @@
+trait LazyExp[+This <: LazyExp[This]] { this: This =>
+ type OpSemExp <: LazyExp[OpSemExp] with This
+ type Val
+}
+
+object Test {
+ def foo[AA <: LazyExp[_]](a: AA): a.OpSemExp#Val = ??? // a.OpSemExp is volatile, because of `with This`
+}