diff --git a/mypy/fastparse.py b/mypy/fastparse.py index bd348e6a0237..34fe2c0da32d 100644 --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -1286,9 +1286,11 @@ def visit_Index(self, n: Index) -> Node: # cast for mypyc's benefit on Python 3.9 return self.visit(cast(Any, n).value) - def visit_Match(self, n: Any) -> None: + def visit_Match(self, n: Any) -> Node: self.fail("Match statement is not supported", line=n.lineno, column=n.col_offset, blocker=True) + # Just return some valid node + return PassStmt() class TypeConverter: