We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 702f3ff commit b9c35c0Copy full SHA for b9c35c0
lib/src/element_type.dart
@@ -104,7 +104,10 @@ class UndefinedElementType extends ElementType {
104
String get name {
105
if (type is VoidType) return 'void';
106
if (type is DynamicType) return 'dynamic';
107
- assert(const {'Never'}.contains(typeElement!.name),
+ // We can not simply throw here because not all SDK libraries resolve
108
+ // all types.
109
+ if (type is InvalidType) return 'dynamic';
110
+ assert(const {'Never'}.contains(typeElement?.name),
111
'Unrecognized type for UndefinedElementType: ${type.toString()}');
112
return typeElement!.name!;
113
}
0 commit comments