pschanely / CrossHair

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

CrosshairInternal error raised when attempting to use symbolic integer as a function #236

Closed pschanely closed 10 months ago

pschanely commented 10 months ago

In this example:

def func2(a: 'int'):
    """
    post: True
    """
    return a(1)

CrossHair raises: CrosshairInternal: Numeric operation on symbolic while not tracing. CrosshairInternal should never be user-visible.

As a bonus, it would be nice to give a useful counterexample; however this is lower priority, as this kind of error is easily detectable with a type checker.

See also the original report in #234

pschanely commented 10 months ago

Fixed in v0.0.47!