-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13069 from dwijnand/patmat-no-check-all
Remove excessive -Ycheck-all-patmat use in tests
- Loading branch information
Showing
24 changed files
with
65 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
2: Pattern Match Exhaustivity: _: Int | ||
58: Match case Unreachable | ||
3: Pattern Match Exhaustivity: _: Int | ||
59: Match case Unreachable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5: Pattern Match Exhaustivity: _: Array[String] | ||
6: Pattern Match Exhaustivity: _: Array[String] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// scalac: -Ycheck-all-patmat | ||
def foo(x: Array[String]) = x match { | ||
case _: Array[_] => | ||
} | ||
|
||
def bar(x: Array[String]) = x match { | ||
case _: Array[_ <: Int] => | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2: Pattern Match Exhaustivity: _: Expr[Int] | ||
3: Pattern Match Exhaustivity: _: Expr[Int] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
9: Pattern Match Exhaustivity: Nil | ||
23: Pattern Match Exhaustivity: true, false | ||
27: Pattern Match Exhaustivity: _: Int | ||
10: Pattern Match Exhaustivity: Nil | ||
24: Pattern Match Exhaustivity: true, false | ||
28: Pattern Match Exhaustivity: _: Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
5: Pattern Match Exhaustivity: Perhaps(None) | ||
15: Pattern Match Exhaustivity: Nil | ||
31: Pattern Match Exhaustivity: Multi(None, _) | ||
44: Pattern Match Exhaustivity: Prod(None, _) | ||
6: Pattern Match Exhaustivity: Perhaps(None) | ||
16: Pattern Match Exhaustivity: Nil | ||
32: Pattern Match Exhaustivity: Multi(None, _) | ||
45: Pattern Match Exhaustivity: Prod(None, _) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// scalac: -Ycheck-all-patmat | ||
object Perhaps { | ||
|
||
def unapply[A](oa: Option[A]): Some[Option[A]] = Some(oa) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2: Pattern Match Exhaustivity: _: AnyVal | ||
3: Pattern Match Exhaustivity: _: AnyVal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// scalac: -Ycheck-all-patmat | ||
object Test { | ||
def foo(x : AnyVal) = x match {case b : Boolean => "It's a bool"} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
2: Pattern Match Exhaustivity: _: Int | ||
7: Pattern Match Exhaustivity: (_, _) | ||
12: Pattern Match Exhaustivity: (true, true), (false, false) | ||
3: Pattern Match Exhaustivity: _: Int | ||
8: Pattern Match Exhaustivity: (_, _) | ||
13: Pattern Match Exhaustivity: (true, true), (false, false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
10: Pattern Match Exhaustivity: _: c.Foo | ||
13: Match case Unreachable | ||
11: Pattern Match Exhaustivity: _: c.Foo | ||
14: Match case Unreachable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// scalac: -Ycheck-all-patmat | ||
class C { | ||
trait Foo | ||
class One extends Foo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
8: Pattern Match Exhaustivity: _: A | ||
17: Pattern Match Exhaustivity: (_, _) | ||
28: Pattern Match Exhaustivity: (_, _) | ||
9: Pattern Match Exhaustivity: _: A | ||
18: Pattern Match Exhaustivity: (_, _) | ||
29: Pattern Match Exhaustivity: (_, _) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// scalac: -Ycheck-all-patmat | ||
trait A {} | ||
case object B extends A {} | ||
case object C extends A {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
3: Pattern Match Exhaustivity: (_, _) | ||
7: Pattern Match Exhaustivity: (_, _) | ||
4: Pattern Match Exhaustivity: (_, _) | ||
8: Pattern Match Exhaustivity: (_, _) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// scalac: -Ycheck-all-patmat | ||
object Example { | ||
val op1: (Any, Any) => Unit = { | ||
case (_, b: Int) => | ||
|