diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6091.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t8013.flags | 2 | ||||
-rw-r--r-- | test/files/pos/t8040.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t8040.scala | 6 |
4 files changed, 10 insertions, 3 deletions
diff --git a/test/files/pos/t6091.scala b/test/files/pos/t6091.scala index 72e663ec3b..0318640e7b 100644 --- a/test/files/pos/t6091.scala +++ b/test/files/pos/t6091.scala @@ -1,6 +1,6 @@ -object Foo { def eq(x:Int) = x } +object Foo { def eq(x: Int) = x } -class X { def ==(other: String) = true } +class X { def ==(other: String) = other.nonEmpty } object Test { def main(args: Array[String]): Unit = { diff --git a/test/files/pos/t8013.flags b/test/files/pos/t8013.flags index 3955bb6710..219723cec9 100644 --- a/test/files/pos/t8013.flags +++ b/test/files/pos/t8013.flags @@ -1 +1 @@ --Xfatal-warnings -Xlint:-infer-any,_ +-Xfatal-warnings -Xlint:missing-interpolator diff --git a/test/files/pos/t8040.flags b/test/files/pos/t8040.flags new file mode 100644 index 0000000000..3126c059f0 --- /dev/null +++ b/test/files/pos/t8040.flags @@ -0,0 +1 @@ +-Xfatal-warnings -Ywarn-unused:params diff --git a/test/files/pos/t8040.scala b/test/files/pos/t8040.scala new file mode 100644 index 0000000000..b067f36b0b --- /dev/null +++ b/test/files/pos/t8040.scala @@ -0,0 +1,6 @@ + +object Test { + implicit class C(val sc: StringContext) { // no warn unused sc + def c(args: Any*): String = "c?" + args.mkString(",") // would warn unused args + } +} |