New semantic analyzer: Refactor handling of is_inferred_def & co
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
There are several things that hold information about whether a type of variable should be inferred or not:
RefExpr.is_new_defRefExpr.is_inferred_defVar.is_readyVar.is_inferredTypeChecker.is_definition()
Such a variety of things is partially caused by the fact that special definitions like named tuples etc. used to have a Var() to which the lvalue was pointing. With the new analyzer we don't have this, so it would be good to clean-up/refactor the logic around inference after we merge the two analyzers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reviewing RefExpr.is_new_def, RefExpr.is_inferred_def, Var.is_ready, Var.is_inferred, and TypeChecker.is_definition() after the two analyzers are merged; done means the inference state is handled consistently without the obsolete special-definition Var assumptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100