Skip to content

Returning Undefined value doesn't get flagged as error #551

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

Closed
gvanrossum opened this issue Jan 7, 2015 · 2 comments
Closed

Returning Undefined value doesn't get flagged as error #551

gvanrossum opened this issue Jan 7, 2015 · 2 comments
Labels

Comments

@gvanrossum
Copy link
Member

This gets no errors:

def words(s: str) -> Dict[str, int]:
    x = Undefined(Dict[str, int])
    return x

Shouldn't it be an error to return an undefined value?

@JukkaL
Copy link
Collaborator

JukkaL commented Jan 8, 2015

Yeah, it would be good to track undefined values and flag an error at least if a program definitely uses an undefined value. This can be implemented using some fairly simple data flow analysis.

@JukkaL
Copy link
Collaborator

JukkaL commented May 17, 2015

We are getting rid of Undefined so this is no longer relevant.

@JukkaL JukkaL closed this as completed May 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants