From fa2deeb4304d149c4870cfb013e7790d6fe00d86 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 5 Sep 2011 00:11:29 +0000 Subject: Offer warning when demonstrably non-side-effect... Offer warning when demonstrably non-side-effecting expressions appear in statement position, which should be unintentional by definition. Threw in removal of six places with useless discarded expressions which the warning informed me about. No review. --- test/files/neg/t1181.check | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/files/neg/t1181.check') diff --git a/test/files/neg/t1181.check b/test/files/neg/t1181.check index 2d7205c61f..3724752a85 100644 --- a/test/files/neg/t1181.check +++ b/test/files/neg/t1181.check @@ -1,4 +1,8 @@ +t1181.scala:8: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses + case (Nil, Nil) => map + ^ t1181.scala:9: error: missing parameter type _ => buildMap(map.updated(keyList.head, valueList.head), keyList.tail, valueList.tail) ^ +one warning found one error found -- cgit v1.2.3