source_gen icon indicating copy to clipboard operation
source_gen copied to clipboard

TypeChecker.isAssignableFromType does not consider nullability

Open simc opened this issue 2 years ago • 3 comments

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

simc avatar Feb 18 '22 08:02 simc

Is this the TypeChecker from package:source_gen? (If so, the issue would fit better in https://github.com/dart-lang/source_gen/issues).

lrhn avatar Feb 18 '22 09:02 lrhn

@lrhn yes, sorry! Should I close here and reopen or can you move the issue?

simc avatar Feb 18 '22 09:02 simc

Turns out I can, so moved!

lrhn avatar Feb 18 '22 09:02 lrhn