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

Typing system struggles to extend global objects #97

Closed
71104 opened this issue Jun 18, 2016 · 0 comments
Closed

Typing system struggles to extend global objects #97

71104 opened this issue Jun 18, 2016 · 0 comments
Labels

Comments

@71104
Copy link
Owner

71104 commented Jun 18, 2016

The current implementation in 1cf6592 (HEAD of types branch) doesn't play well when trying to extend variables that are not explicitly defined by the program:

Math.pow                      # closure: unknown

let Math.lol = 0 in Math.pow  # type error

The type system can't possibly tell whether a variable is provided by the native environment or not.

Possible solution: make unknown an extensible type by making UnknownType actually inherit UndefinedType.

It would also be good to remove all uses of is and isAny in types.

@71104 71104 added the bug label Jun 18, 2016
71104 added a commit that referenced this issue Jun 19, 2016
@71104 71104 closed this as completed Jun 19, 2016
71104 added a commit that referenced this issue Jun 19, 2016
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

1 participant