dart-lang / dart-lang/language
Flow analysis - keep non-nullability on join
Open
Nobody has claimed this yet.
feature
flow-analysis
nnbd
request
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
Here ancestor has initially type Element?, so cannot be promoted to either ClassElement or ExtensionElement.
But it cannot be null if any of them is true.
var ancestor = enclosingElement;
if (ancestor is ClassElement || ancestor is ExtensionElement) {
if (ancestor.hasDoNotStore) {
return true;
}
}
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
Start with the flow-analysis example in the issue and review the language specification's rules for type promotion across a join. Done means the stated non-nullability is preserved when either type test succeeds, with the behavior documented and covered by the relevant specification examples or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100