Skip to content

Commit

Permalink
Report more warnings for pattern match
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Jun 15, 2023
1 parent 473e765 commit ce093cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/init/Objects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,9 @@ object Objects:

case Match(selector, cases) =>
eval(selector, thisV, klass)
evalExprs(cases.map(_.body), thisV, klass).join
// TODO: handle pattern match properly
report.warning("[initChecker] Pattern match is skipped. Trace:\n" + Trace.show, expr)
Bottom

case Return(expr, from) =>
Returns.handle(from.symbol, eval(expr, thisV, klass))
Expand Down

0 comments on commit ce093cb

Please sign in to comment.