Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None issue #1258

Closed
diorcety opened this issue Apr 1, 2019 · 0 comments
Closed

None issue #1258

diorcety opened this issue Apr 1, 2019 · 0 comments

Comments

@diorcety
Copy link
Contributor

diorcety commented Apr 1, 2019

Type inference issue when using none

#pythran export aa(str:str dict)
def aa(headers):
    errors = []
    xxx = None

    def add_error(type, args):
        errors.append((type, args))

    if "DUMMY_PYTHRAN" in headers:
        xxx = True

    if xxx is not None:
        add_error(1, ['AAAAA'])

    #if xxx is not None and xxx: # Can't compile
    #    add_error(1, ['AAAAA'])

    #if "DUMMY_PYTHRAN" in headers: # Without that we have a missing symbol at runtime
    #    add_error(2, ['DUMMY_PYTHRAN'])
    return errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant