Should the language server warn about this case?
Consider the following code:
Mojo language server doesn't produce a type error when body doesn't contain a
FYI, Python language server like
Mojo language server doesn't produce a type error when body doesn't contain a
return. There are cases where this makes sense, like when <body> contains only pass or .... However, for the majority of cases, this clearly won't type check. So, I'm not sure if it's a bug or intended behaviour.FYI, Python language server like
pyright produces the following error message: