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 #9163 from dwijnand/exhaust-tuple-unsealed-false-p…
…ositive Fix exhaustivity uncheckableType's logic for tuples
- Loading branch information
Showing
3 changed files
with
20 additions
and
3 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
-Xfatal-warnings |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
abstract class Foo { | ||
def bar(): Unit = this match { | ||
case Foo_1() => //do something | ||
case Foo_2() => //do something | ||
// Works fine | ||
} | ||
|
||
def baz(that: Foo): Unit = (this, that) match { | ||
case (Foo_1(), _) => //do something | ||
case (Foo_2(), _) => //do something | ||
// match may not be exhaustive | ||
} | ||
} | ||
case class Foo_1() extends Foo | ||
case class Foo_2() extends Foo |