From 3df1d77fc984b976efa68098206e801cf3b83a9e Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 16 Aug 2013 14:18:20 +0200 Subject: SI-7756 Uncripple refchecks in case bodies In 65340ed4ad2e, parts of RefChecks were disabled when we traversed into the results of the new pattern matcher. Similar logic existed for the old pattern matcher, but in that case the Match / CaseDef nodes still existed in the tree. The new approach was too broad: important checks no longer scrutinized the body of cases. This commit turns the checks back on when it finds the remnants of a case body, which appears as an application to a label def. --- test/files/neg/t7756b.check | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/neg/t7756b.check (limited to 'test/files/neg/t7756b.check') diff --git a/test/files/neg/t7756b.check b/test/files/neg/t7756b.check new file mode 100644 index 0000000000..2817a7e230 --- /dev/null +++ b/test/files/neg/t7756b.check @@ -0,0 +1,6 @@ +t7756b.scala:3: warning: comparing values of types Int and String using `==' will always yield false + case _ => 0 == "" + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found -- cgit v1.2.3