File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ ## 1.3.2
2+
3+ * Make ` TypeChecker.isAssignableFromType() ` null safe.
4+
15## 1.3.1
26
37* Always use a Uri in ` part of ` directives (previously a name would be used if
Original file line number Diff line number Diff line change @@ -167,8 +167,10 @@ abstract class TypeChecker {
167167 (element is InterfaceElement && element.allSupertypes.any (isExactlyType));
168168
169169 /// Returns `true` if [staticType] can be assigned to this type.
170- bool isAssignableFromType (DartType staticType) =>
171- isAssignableFrom (staticType.element! );
170+ bool isAssignableFromType (DartType staticType) {
171+ final element = staticType.element;
172+ return element != null && isAssignableFrom (element);
173+ }
172174
173175 /// Returns `true` if representing the exact same class as [element] .
174176 bool isExactly (Element element);
Original file line number Diff line number Diff line change 11name : source_gen
2- version : 1.3.1
2+ version : 1.3.2
33description : >-
44 Source code generation builders and utilities for the Dart build system
55repository : https://github.com/dart-lang/source_gen/tree/master/source_gen
You can’t perform that action at this time.
0 commit comments