You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try using Convert python bytecode to Simple AST and using Stack Machine to simple type check
usage
fromTVarimport*fromcheckimportT@Tdefsum( ilst : [Int] ) ->Int :
ifilst== [ ]:
return0else:
returnilst[0] +sum(ilst[1:])
"""this example is right but next example is not right"""
# when ilst is empty list then sum function return None , None in TVar is Unit ,# but sum function __annotations__ return type is Int , so , will raise a Error of typecheck# machine.CheckError: for return type(s): Int and Unit