File tree 3 files changed +9
-3
lines changed
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
+
1
5
## 1.3.1
2
6
3
7
* 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 {
167
167
(element is InterfaceElement && element.allSupertypes.any (isExactlyType));
168
168
169
169
/// 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
+ }
172
174
173
175
/// Returns `true` if representing the exact same class as [element] .
174
176
bool isExactly (Element element);
Original file line number Diff line number Diff line change 1
1
name : source_gen
2
- version : 1.3.1
2
+ version : 1.3.2
3
3
description : >-
4
4
Source code generation builders and utilities for the Dart build system
5
5
repository : https://github.com/dart-lang/source_gen/tree/master/source_gen
You can’t perform that action at this time.
0 commit comments