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] -- [E029] PatternMatchExhaustivityWarning:/path/to/gadt/src/main/scala/repro.scala:6:44
[warn] 6|defdoFoo[A](foo: Foo[A, String]):String= foo match
[warn] |^^^
[warn] |match may not be exhaustive.
[warn] |
[warn] |It would fail on pattern case:Foo.Bar()
Expectation
I would expect this not to warn, since there's a clear case Foo.Bar() => ... statement.
The text was updated successfully, but these errors were encountered:
enumFoo[A, B]:caseBar[A]() extendsFoo[A, A]
defdoFoo[A](foo: Foo[A, String]):Foo[A, String] = foo matchcase s @Foo.Bar() => s
[warn] -- [E029] PatternMatchExhaustivityWarning:/path/torefl/src/main/scala/repro.scala:6:52
[warn] 6|defdoFoo[A](foo: Foo[A, String]):Foo[A, String] = foo match
[warn] |^^^
[warn] |match may not be exhaustive.
[warn] |
[warn] |It would fail on pattern case:Foo.Bar()
[warn] --UncheckedWarning:/path/to/refl/src/main/scala/repro.scala:7:7
[warn] 7|case s @Foo.Bar() => s
[warn] |^
[warn] | the typetestfor repro.Foo.Bar[A] cannot be checked at runtime
Compiler version
3.1.2
Minimized code
Output
Expectation
I would expect this not to warn, since there's a clear
case Foo.Bar() => ...
statement.The text was updated successfully, but these errors were encountered: