-
Notifications
You must be signed in to change notification settings - Fork 4
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
Checker doesn't take largest demoninator #296
Labels
bug: check
Something in the type check module isn't working (as intended)
Milestone
Comments
JSAbrahams
added a commit
that referenced
this issue
Jun 24, 2022
We should modify the context such that it read Python files and cna deal with function overloading. When checking, it should then pick the correct function and use its return type when checking. Should also work for constructors. - Potentially could help fix #296
Lets move to next milestone since this might require a non-trivial restructuring. |
JSAbrahams
added a commit
that referenced
this issue
Dec 28, 2022
This means that in certain situations, a Name is a superset of another if it is a superset of just one of the types of other. For now, this is useful at a function call site where we generate such constraints on the fly. There, we only need the current expression to be super of one. However, seeing as we only have one use case at the moment, I'm not sure this logic belongs in Name itself. Perhaps this might be useful in future for fixing other issues. Issues such as #296 come to mind. - Unignore certain mutability test.
JSAbrahams
added a commit
that referenced
this issue
Dec 28, 2022
* [ci skip] Add test assign to nullable class field * [ci skip] Fix field access constraint generation However now we have an issue that primitive comparisons seems to trip up. Something is up with how we generate constraints on the fly for field access in conjunction with function access. If we flip back the field_ty_exp, then we no longer get the failed definition_ast_verify test. It seems that if we fix the issue with the Union, we get nullability check issues and vice versa. * Some cleanup * Substitute also assumes constraints mutable ref - reinsert also assumes constraint mutable ref - Improve Position Display - Improve Constraint Display - Improve access logic * [ci skip] Field type super in field access gen * Add exception that Name may be super of any This means that in certain situations, a Name is a superset of another if it is a superset of just one of the types of other. For now, this is useful at a function call site where we generate such constraints on the fly. There, we only need the current expression to be super of one. However, seeing as we only have one use case at the moment, I'm not sure this logic belongs in Name itself. Perhaps this might be useful in future for fixing other issues. Issues such as #296 come to mind. - Unignore certain mutability test. * Cleanup
JSAbrahams
added a commit
that referenced
this issue
Dec 28, 2022
* [ci skip] Add test assign to nullable class field * [ci skip] Fix field access constraint generation However now we have an issue that primitive comparisons seems to trip up. Something is up with how we generate constraints on the fly for field access in conjunction with function access. If we flip back the field_ty_exp, then we no longer get the failed definition_ast_verify test. It seems that if we fix the issue with the Union, we get nullability check issues and vice versa. * Some cleanup * Substitute also assumes constraints mutable ref - reinsert also assumes constraint mutable ref - Improve Position Display - Improve Constraint Display - Improve access logic * [ci skip] Field type super in field access gen * Add exception that Name may be super of any This means that in certain situations, a Name is a superset of another if it is a superset of just one of the types of other. For now, this is useful at a function call site where we generate such constraints on the fly. There, we only need the current expression to be super of one. However, seeing as we only have one use case at the moment, I'm not sure this logic belongs in Name itself. Perhaps this might be useful in future for fixing other issues. Issues such as #296 come to mind. - Unignore certain mutability test. * Cleanup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Bug
Type checker does not take largest demoninator.
How to Reproduce
Expected behavior
Results in type checker tripping on
a
, should beFloat
but checker assumes it isInt
.The text was updated successfully, but these errors were encountered: