Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check all bindings exhaustively, e.g. tuples components
The change to drop the null checks (introducing `TreeMakersToPropsIgnoreNullChecks`) over-reached and got rid of all the Vars that those null-checks were referencing. So, instead of that, finish honouring the `modelNull` option in `removeVarEq`.
- Loading branch information
Showing
5 changed files
with
27 additions
and
9 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
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,11 @@ | ||
t10019.scala:4: warning: match may not be exhaustive. | ||
It would fail on the following input: Foo(None) | ||
def single(t: Foo): Nothing = t match { | ||
^ | ||
t10019.scala:8: warning: match may not be exhaustive. | ||
It would fail on the following input: (Foo(None), _) | ||
def tuple(s: Foo, t: Foo): Nothing = (s, t) match { | ||
^ | ||
error: No warnings can be incurred under -Xfatal-warnings. | ||
two warnings found | ||
one error found |
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,11 @@ | ||
object Bug { | ||
sealed case class Foo(e: Option[Int]) | ||
|
||
def single(t: Foo): Nothing = t match { | ||
case Foo(Some(_)) => ??? | ||
} | ||
|
||
def tuple(s: Foo, t: Foo): Nothing = (s, t) match { | ||
case (Foo(Some(_)), _) => ??? | ||
} | ||
} |