Skip to content

Commit 3ec2223

Browse files
dwijnandtgodzik
authored andcommitted
Move exh checking case class tests in
[Cherry-picked 892f048]
1 parent 52e811c commit 3ec2223

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

library/src/scala/annotation/newMain.scala

+1
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ final class newMain extends MainAnnotation[FromString, Any]:
253253
case (arg +: t, "") => recurse(t, arg, acc)
254254
case (arg +: t, l) if l.length + 1 + arg.length <= maxLength => recurse(t, s"$l $arg", acc)
255255
case (arg +: t, l) => recurse(t, arg, acc :+ l)
256+
case (_, _) => acc
256257
}
257258

258259
recurse(argsUsage, "", Vector()).toList

i22590.arity2.scala renamed to tests/warn/i22590.arity2.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ case class CC_B[B](a: B,b:T_B) extends T_A
88

99
@main def test() = {
1010
val v_a: CC_B[Int] = null
11-
val v_b: Int = v_a match {
11+
val v_b: Int = v_a match { // warn: match may not be exhaustive.
1212
case CC_B(12, CC_A()) => 0
1313
case CC_B(_, CC_C()) => 0
1414
}

i22590.scala renamed to tests/warn/i22590.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ case class CC_B[T](a: T) extends T_A
33

44
@main def test() = {
55
val v_a: CC_B[Int] = CC_B(10)
6-
val v_b: Int = v_a match{
6+
val v_b: Int = v_a match{ // warn: match may not be exhaustive.
77
case CC_B(12) => 0
88
}
99
}

0 commit comments

Comments
 (0)