summaryrefslogtreecommitdiff
path: root/test/files/run/bug266.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-09-28 15:42:05 +0000
committerPaul Phillips <paulp@improving.org>2010-09-28 15:42:05 +0000
commit19b42dea4538d20b696de4bdb0b01e7fdef2dd36 (patch)
tree968d82f78e7407de8bc77719cdc48cfb30002cc5 /test/files/run/bug266.scala
parent7673099e4778f320ef3fe761fe90e7f009903038 (diff)
downloadscala-19b42dea4538d20b696de4bdb0b01e7fdef2dd36.tar.gz
scala-19b42dea4538d20b696de4bdb0b01e7fdef2dd36.tar.bz2
scala-19b42dea4538d20b696de4bdb0b01e7fdef2dd36.zip
Fixed an ancient crasher in explicitouter invol...
Fixed an ancient crasher in explicitouter involving singleton self-types. Closes #266, review by odersky.
Diffstat (limited to 'test/files/run/bug266.scala')
-rw-r--r--test/files/run/bug266.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/bug266.scala b/test/files/run/bug266.scala
new file mode 100644
index 0000000000..20a29dabbb
--- /dev/null
+++ b/test/files/run/bug266.scala
@@ -0,0 +1,23 @@
+// #266, yee ha
+
+trait O {
+ self: Test.type =>
+
+ Nil foreach identity
+
+ def f = (1 to 10).toList map identity
+}
+
+object Test extends O {
+ def main(args: Array[String]): Unit = {
+ assert(f.sum == 55)
+ }
+}
+
+// Don't lose this part, it's what (formerly) crashes.
+// For some reason the one actually mixed in does not.
+object Pip
+
+trait P { self: Pip.type =>
+ Nil foreach identity
+} \ No newline at end of file