Type check does not catch if function returns None when it should return a non-nullable type.
At the very least, it doesn't catch this if the None is nested in a ternary expression.
How to Reproduce
Run a check on:
def f() -> Int => if True then 10 else None
Description of Bug
Type check does not catch if function returns
None
when it should return a non-nullable type. At the very least, it doesn't catch this if theNone
is nested in a ternary expression.How to Reproduce
Run a check on:
def f() -> Int => if True then 10 else None
Expected behavior
Should not check.