aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-08 20:16:03 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-14 14:30:08 +0100
commitac99941234da48427d1ca10823e45aa740baa354 (patch)
tree8e19632f197d0430ba0bd44b00ec5d04163a795b /tests
parent6c9168467d9278e13c06fc7e56ae7bf331ae0198 (diff)
downloaddotty-ac99941234da48427d1ca10823e45aa740baa354.tar.gz
dotty-ac99941234da48427d1ca10823e45aa740baa354.tar.bz2
dotty-ac99941234da48427d1ca10823e45aa740baa354.zip
Do not report data races between symbols defined in class and its selftype
Analogous to the previous situation where we do not report a data race if the previous symbol comes from a superclass, we now do the same if the previous symbol comes from a given self type. Makes overrideDataRace.scala pass, and finally enables stdlib test with TraverableViewLike.scala added.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/overrideDataRace.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pos/overrideDataRace.scala b/tests/pos/overrideDataRace.scala
new file mode 100644
index 000000000..830ffd668
--- /dev/null
+++ b/tests/pos/overrideDataRace.scala
@@ -0,0 +1,13 @@
+package test
+
+trait Traversable {
+ def mkString: String = ???
+}
+
+trait ViewMkString {
+ self: Traversable =>
+
+ def mkString: String = mkString("")
+ def mkString(s: String) = ???
+
+}