Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/type_system.dart |
| diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart |
| index 0138526a9d239316da15ec1329bcefa1075423c6..28baf9fa9fa41e6a1823e32aacf8097e855b4728 100644 |
| --- a/pkg/analyzer/lib/src/generated/type_system.dart |
| +++ b/pkg/analyzer/lib/src/generated/type_system.dart |
| @@ -763,6 +763,16 @@ class StrongTypeSystemImpl extends TypeSystem { |
| return (t.isDynamic && !dynamicIsBottom) || t.isObject; |
| } |
| + bool isNonNullableType(DartType type) { |
| + return nonnullableTypes.contains(_getTypeFullyQualifiedName(type)); |
| + } |
| + |
| + /// Given a type return its name prepended with the URI to its containing |
| + /// library and separated by a comma. |
| + String _getTypeFullyQualifiedName(DartType type) { |
| + return "${type?.element?.library?.identifier},$type"; |
|
Jennifer Messerly
2016/08/03 18:06:56
.source.uri ?
stanm
2016/08/03 18:46:20
Done.
|
| + } |
| + |
| /** |
| * This currently just implements a simple least upper bound to |
| * handle some common cases. It also avoids some termination issues |