summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/inlineMaxSize.check4
-rw-r--r--test/files/neg/inlineMaxSize.scala2
-rw-r--r--test/files/neg/t7623.check24
-rw-r--r--test/files/neg/t7623.scala8
4 files changed, 16 insertions, 22 deletions
diff --git a/test/files/neg/inlineMaxSize.check b/test/files/neg/inlineMaxSize.check
index d218a8b6e2..9d790e154c 100644
--- a/test/files/neg/inlineMaxSize.check
+++ b/test/files/neg/inlineMaxSize.check
@@ -2,8 +2,8 @@ inlineMaxSize.scala:7: warning: C::i()I is annotated @inline but could not be in
The size of the callsite method C::j()I
would exceed the JVM method size limit after inlining C::i()I.
- @inline final def j = i + i
- ^
+ @inline final def j = i + i + i
+ ^
error: No warnings can be incurred under -Xfatal-warnings.
one warning found
one error found
diff --git a/test/files/neg/inlineMaxSize.scala b/test/files/neg/inlineMaxSize.scala
index 16dc0d9538..9d2db1a357 100644
--- a/test/files/neg/inlineMaxSize.scala
+++ b/test/files/neg/inlineMaxSize.scala
@@ -4,5 +4,5 @@ class C {
@inline final def g = f + f + f + f + f + f + f + f + f + f
@inline final def h = g + g + g + g + g + g + g + g + g + g
@inline final def i = h + h + h + h + h + h + h + h + h + h
- @inline final def j = i + i
+ @inline final def j = i + i + i
}
diff --git a/test/files/neg/t7623.check b/test/files/neg/t7623.check
index db368dd369..de35023664 100644
--- a/test/files/neg/t7623.check
+++ b/test/files/neg/t7623.check
@@ -1,21 +1,15 @@
-t7623.scala:19: warning: A repeated case parameter or extracted sequence should be matched only by a sequence wildcard (_*).
- def f = "" match { case X(s) => }
+t7623.scala:21: warning: A repeated case parameter or extracted sequence is not matched by a sequence wildcard (_*), and may fail at runtime.
+ def g = "" match { case X(s, t) => } // warn
^
-t7623.scala:21: warning: A repeated case parameter or extracted sequence should be matched only by a sequence wildcard (_*).
- def g = "" match { case X(s, t) => }
+t7623.scala:23: warning: Sequence wildcard (_*) does not align with repeated case parameter or extracted sequence; the result may be unexpected.
+ def h = "" match { case X(s, t, u @ _*) => } // warn
^
-t7623.scala:23: warning: A repeated case parameter or extracted sequence should be matched only by a sequence wildcard (_*).
- def h = "" match { case X(s, t, u @ _*) => }
- ^
-t7623.scala:9: warning: A repeated case parameter or extracted sequence should be matched only by a sequence wildcard (_*).
- def f = C("") match { case C(s) => }
- ^
-t7623.scala:11: warning: A repeated case parameter or extracted sequence should be matched only by a sequence wildcard (_*).
- def g = C("") match { case C(s, t) => }
+t7623.scala:11: warning: A repeated case parameter or extracted sequence is not matched by a sequence wildcard (_*), and may fail at runtime.
+ def g = C("") match { case C(s, t) => } // warn
^
-t7623.scala:13: warning: A repeated case parameter or extracted sequence should be matched only by a sequence wildcard (_*).
- def h = C("") match { case C(s, t, u @ _*) => }
+t7623.scala:13: warning: Sequence wildcard (_*) does not align with repeated case parameter or extracted sequence; the result may be unexpected.
+ def h = C("") match { case C(s, t, u @ _*) => } // warn
^
error: No warnings can be incurred under -Xfatal-warnings.
-6 warnings found
+four warnings found
one error found
diff --git a/test/files/neg/t7623.scala b/test/files/neg/t7623.scala
index 5c40f37bc1..5334cc5f69 100644
--- a/test/files/neg/t7623.scala
+++ b/test/files/neg/t7623.scala
@@ -8,9 +8,9 @@ object X { def unapplySeq(a: Any): Option[(String, Seq[Int])] = Some("", List(1,
trait Ctest {
def f = C("") match { case C(s) => }
- def g = C("") match { case C(s, t) => }
+ def g = C("") match { case C(s, t) => } // warn
- def h = C("") match { case C(s, t, u @ _*) => }
+ def h = C("") match { case C(s, t, u @ _*) => } // warn
def ok = C("") match { case C(s, u @ _*) => }
}
@@ -18,9 +18,9 @@ trait Ctest {
trait Xtest {
def f = "" match { case X(s) => }
- def g = "" match { case X(s, t) => }
+ def g = "" match { case X(s, t) => } // warn
- def h = "" match { case X(s, t, u @ _*) => }
+ def h = "" match { case X(s, t, u @ _*) => } // warn
def ok = "" match { case X(s, u @ _*) => }
}