You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[warn] /tmp/ah/demo.scala:23: unreachable code
[warn] case H2(_: FA) =>
Very interestingly, H1 and H2 both having a parameter with the same name seems to be pertinent. If you rename H2's "a" to "b" you get a different (incorrect) warning:
[warn] It would fail on the following input: H2(_)
[warn] val demo: H => Unit = {
Renaming H2's "a" to "x" the warnings disappear.
Finally, rearranging the order of cases produces different, incorrect warnings, likely related to #9399 and #9398. Example:
In following snippet:
the naughty little compiler lies and reports:
Very interestingly, H1 and H2 both having a parameter with the same name seems to be pertinent. If you rename H2's "a" to "b" you get a different (incorrect) warning:
Renaming H2's "a" to "x" the warnings disappear.
Finally, rearranging the order of cases produces different, incorrect warnings, likely related to #9399 and #9398. Example:
produces
The text was updated successfully, but these errors were encountered: