Closed JSAbrahams closed 1 year ago
Type checker cannot check whether function returns exception.
def g() -> Int raise [Exception] => raise Exception("A") def f(x: Int) -> Int=> g() handle err: Exception => x + 10
Gives the following error:
Error: Exceptions not covered: Exception --> my_file.mamba:5:5 4 | def f(x: Int) -> Int => 5 | g() handle ^^^ 6 | err: Exception => x + 10
Should pass check stage. The handle does have a match arm for the Exception error.
Exception
Description of Bug
Type checker cannot check whether function returns exception.
How to Reproduce
Gives the following error:
Expected behavior
Should pass check stage. The handle does have a match arm for the
Exception
error.