reticulated icon indicating copy to clipboard operation
reticulated copied to clipboard

Why does retic check return types twice?

Open bennn opened this issue 7 years ago • 0 comments

Reticulated seems to check return types in two places:

  1. at the return statement in a function
  2. 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

bennn avatar May 23 '17 18:05 bennn