summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-10-21 09:55:18 +0200
committerGitHub <noreply@github.com>2016-10-21 09:55:18 +0200
commit5f894c06da97fdcebf206ac41b4694beb7b27a05 (patch)
treefeb13364f578c3acd00eeaaecf85f03dd14c1ff3 /test/files/pos
parent5b8e4d3436b4b22d67b99e37573957554f151dd9 (diff)
parent94518ce0be2ffdb06d1d3f81279fdc05fa568c0b (diff)
downloadscala-5f894c06da97fdcebf206ac41b4694beb7b27a05.tar.gz
scala-5f894c06da97fdcebf206ac41b4694beb7b27a05.tar.bz2
scala-5f894c06da97fdcebf206ac41b4694beb7b27a05.zip
Merge pull request #5393 from som-snytt/issue/nowarn-thistype-discard
No warn when discarding r.f(): r.type
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t9020.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/t9020.scala b/test/files/pos/t9020.scala
index 16e31e2572..c77a63cb1a 100644
--- a/test/files/pos/t9020.scala
+++ b/test/files/pos/t9020.scala
@@ -8,3 +8,9 @@ test/files/pos/t9020.scala:2: warning: discarded non-Unit value
^
one warning found
*/
+
+trait DiscardThis {
+ import collection.mutable.ListBuffer
+ val b = ListBuffer.empty[String]
+ def add(s: String): Unit = b += s
+}