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/stmt-expr-discard.scala | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/files/neg/stmt-expr-discard.scala (limited to 'test/files/neg/stmt-expr-discard.scala') diff --git a/test/files/neg/stmt-expr-discard.scala b/test/files/neg/stmt-expr-discard.scala new file mode 100644 index 0000000000..e60c854625 --- /dev/null +++ b/test/files/neg/stmt-expr-discard.scala @@ -0,0 +1,5 @@ +class A { + def f = 1 + + 2 + - 4 +} -- cgit v1.2.3