pschanely / CrossHair

An analysis tool for Python that blurs the line between testing and type systems.
Other
1.03k stars 49 forks source link

Generic objects, when realized to strings, raise TypeError on concatenation. #235

Closed pschanely closed 10 months ago

pschanely commented 10 months ago

CrossHair's counterexample does not reproduce in this example:

def arithmetic_op(a, b):
    """
    post: True
    """
    result = a + b
    return result

# actual: /tmp/main.py:5: error: TypeError:  when calling arithmetic_op('', '')
# expect: counterexamples like arithmetic_op('', 0)

See also the original report in #234