summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-05-17 00:00:10 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-05-17 00:00:10 -0700
commit9d5e143d29c0f43a97c62aee537de1c889e6c15f (patch)
tree139a6e658d90f7d98b959a24c59c64fe796b831f /test/files/pos
parent13b4628aabb8e7a293a382dcab6db5848f672f94 (diff)
parent9a4361178f87d4540169422a1f9462aa2b539cb5 (diff)
downloadscala-9d5e143d29c0f43a97c62aee537de1c889e6c15f.tar.gz
scala-9d5e143d29c0f43a97c62aee537de1c889e6c15f.tar.bz2
scala-9d5e143d29c0f43a97c62aee537de1c889e6c15f.zip
Merge pull request #2374 from adriaanm/ticket-6815
SI-6815 untangle isStable and hasVolatileType
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t6815.scala17
-rw-r--r--test/files/pos/t6815_import.scala16
2 files changed, 33 insertions, 0 deletions
diff --git a/test/files/pos/t6815.scala b/test/files/pos/t6815.scala
new file mode 100644
index 0000000000..9244b3d353
--- /dev/null
+++ b/test/files/pos/t6815.scala
@@ -0,0 +1,17 @@
+trait U {
+ trait ValOrDefDefApi {
+ def name: Any
+ }
+ type ValOrDefDef <: ValOrDefDefApi
+ type ValDef <: ValOrDefDef with ValDefApi
+ trait ValDefApi extends ValOrDefDefApi { this: ValDef => }
+ val emptyValDef: ValDef // the result type is volatile
+}
+
+object Test {
+ val u: U = ???
+
+ u.emptyValDef match {
+ case u.emptyValDef => // but we shouldn't let that stop us from treating it as a stable identifier pattern.
+ }
+}
diff --git a/test/files/pos/t6815_import.scala b/test/files/pos/t6815_import.scala
new file mode 100644
index 0000000000..56f4358d59
--- /dev/null
+++ b/test/files/pos/t6815_import.scala
@@ -0,0 +1,16 @@
+trait U {
+ trait ValOrDefDefApi {
+ def name: Any
+ }
+ type ValOrDefDef <: ValOrDefDefApi
+ type ValDef <: ValOrDefDef with ValDefApi
+ trait ValDefApi extends ValOrDefDefApi { this: ValDef => }
+ val emptyValDef: ValDef // the result type is volatile
+}
+
+object Test {
+ val u: U = ???
+
+ // but we shouldn't let that stop us from treating it as a stable identifier for import
+ import u.emptyValDef.name
+}