fix(checker): type check none literal

This commit is contained in:
2026-07-09 17:39:11 +02:00
parent a7b62e752b
commit 7a021b2450

View File

@@ -364,6 +364,8 @@ class MidasTyper(m.Stmt.Visitor[None], m.Expr.Visitor[Type], m.Type.Visitor[Type
return self.types.get_type("float")
case str():
return self.types.get_type("str")
case None:
return self.types.get_type("None")
case _:
self.reporter.warning(expr.location, f"Unknown literal {expr}")
return UnknownType()