summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-02-09 17:44:32 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-02-09 17:44:32 -0800
commit6724890e36c5c3c6a6b79f1b5322b9c2932de9e1 (patch)
tree6076f4eaf1463ff94e07b8bcf161367f80ac528a /test
parentcc9402b0d639dd5d9ac0b468b49a3ef7c2d80d39 (diff)
parent10ca1783d45dc9c87ea0c09f4ea046ac539f1749 (diff)
downloadscala-6724890e36c5c3c6a6b79f1b5322b9c2932de9e1.tar.gz
scala-6724890e36c5c3c6a6b79f1b5322b9c2932de9e1.tar.bz2
scala-6724890e36c5c3c6a6b79f1b5322b9c2932de9e1.zip
Merge pull request #3476 from retronym/ticket/8207
SI-8207 Allow import qualified by self reference
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t8207.check7
-rw-r--r--test/files/neg/t8207.scala3
-rw-r--r--test/files/pos/t8207.scala6
3 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t8207.check b/test/files/neg/t8207.check
new file mode 100644
index 0000000000..59facd897a
--- /dev/null
+++ b/test/files/neg/t8207.check
@@ -0,0 +1,7 @@
+t8207.scala:1: error: '.' expected but '}' found.
+class C { import C.this.toString }
+ ^
+t8207.scala:3: error: '.' expected but '}' found.
+class D { import D.this.toString }
+ ^
+two errors found
diff --git a/test/files/neg/t8207.scala b/test/files/neg/t8207.scala
new file mode 100644
index 0000000000..738ce381f4
--- /dev/null
+++ b/test/files/neg/t8207.scala
@@ -0,0 +1,3 @@
+class C { import C.this.toString }
+
+class D { import D.this.toString }
diff --git a/test/files/pos/t8207.scala b/test/files/pos/t8207.scala
new file mode 100644
index 0000000000..680b40f379
--- /dev/null
+++ b/test/files/pos/t8207.scala
@@ -0,0 +1,6 @@
+class C { me =>
+ import me.{toString => ts}
+ locally(this: me.type)
+ trait T
+ type X = me.T
+}