From e0068b908517768e900a3945e483e9c379d728d8 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 5 Feb 2013 00:46:58 +0100 Subject: SI-5675 Discard duplicate feature warnings at a position When -feature has not been enabled, we were double counting identical feature warnings that were emitted at the same position. Normal error reporting only reports the first time a warning appears at a position; feature warning counter incrementing should behave the same way. @hubertp: Fixed .check files that were broken in the original commit. --- test/files/neg/t3234.check | 2 +- test/files/neg/t5675.check | 2 ++ test/files/neg/t5675.flags | 1 + test/files/neg/t5675.scala | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/files/neg/t5675.check create mode 100644 test/files/neg/t5675.flags create mode 100644 test/files/neg/t5675.scala (limited to 'test/files/neg') diff --git a/test/files/neg/t3234.check b/test/files/neg/t3234.check index 477b021e5e..4339950ecb 100644 --- a/test/files/neg/t3234.check +++ b/test/files/neg/t3234.check @@ -1,2 +1,2 @@ -error: there were 1 inliner warnings; re-run with -Yinline-warnings for details +error: there were 1 inliner warning(s); re-run with -Yinline-warnings for details one error found diff --git a/test/files/neg/t5675.check b/test/files/neg/t5675.check new file mode 100644 index 0000000000..da608a2b78 --- /dev/null +++ b/test/files/neg/t5675.check @@ -0,0 +1,2 @@ +error: there were 1 feature warning(s); re-run with -feature for details +one error found diff --git a/test/files/neg/t5675.flags b/test/files/neg/t5675.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/neg/t5675.flags @@ -0,0 +1 @@ +-Xfatal-warnings \ No newline at end of file diff --git a/test/files/neg/t5675.scala b/test/files/neg/t5675.scala new file mode 100644 index 0000000000..238ed0fcae --- /dev/null +++ b/test/files/neg/t5675.scala @@ -0,0 +1,7 @@ +class PostFix { + val list = List(1, 2, 3) + def main(args: Array[String]) { + val a = list filter (2 !=) + val b = list filter (2 != _) + } +} -- cgit v1.2.3