reticulated
reticulated copied to clipboard
Why does retic check return types twice?
Reticulated seems to check return types in two places:
- at the
return
statement in a function - at the call-site to a function
Is the first check necessary?
Example program:
def f()->List(Int):
return []
f()
The output of retic -p
has check_type_list
before the return
statement and around the call to f
:
from retic.runtime import *
from retic.transient import *
from retic.typing import *
def f():
return check_type_list([])
f = check_type_function(f)
check_type_list(f())
Reported by @migeed-z