dart-lang / dart-lang/source_gen
TypeChecker.isAssignableFromType does not consider nullability
Open
- Dominant language
- Dart
- Stars
- 494
- Forks
- 115
- Avg merge
- 12h 13m
- Merged PRs (30d)
- 3
Description
I would expect `TypeChecker.isAssignableFromType(staticType)` to take the nullability of the types into account. It returns `true` incorrectly if the TypeChecker type is not nullable but `staticType` is nullable.
Dart SDK version: 2.16.1
Contributor guide
Research direction
Locate TypeChecker.isAssignableFromType and reproduce the nullable staticType case described in the issue, using the referenced Dart SDK version if available. The work is complete when a non-nullable TypeChecker type is not considered assignable from a nullable staticType, with coverage for the nullability behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100