From 92460c57eb7a0a8cfcff563d868aa39015f0b764 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 26 Mar 2014 17:33:26 -0700 Subject: SI-8450 no "implicit numeric widening" in silent mode Before this fix, we get a second, spurious warning. ``` t8450.scala:5: warning: implicit numeric widening def elapsed: Foo = (System.nanoTime - 100L).foo ^ t8450.scala:11: warning: implicit numeric widening def elapsed: Foo = (System.nanoTime - 100L).foo ^ error: No warnings can be incurred under -Xfatal-warnings. two warnings found one error found ``` By respecting silent contexts, we now get only one. I sneakily fixed similar occurrences without adding a test. --- test/files/neg/t8450.check | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/neg/t8450.check (limited to 'test/files/neg/t8450.check') diff --git a/test/files/neg/t8450.check b/test/files/neg/t8450.check new file mode 100644 index 0000000000..eeabb9730c --- /dev/null +++ b/test/files/neg/t8450.check @@ -0,0 +1,6 @@ +t8450.scala:5: warning: implicit numeric widening + def elapsed: Foo = (System.nanoTime - 100L).foo + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found -- cgit v1.2.3