Skip to content

Commit 95279c1

Browse files
authored
Add Never to type text (#2170)
1 parent a0cec02 commit 95279c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/element_type.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ class UndefinedElementType extends ElementType {
114114
}
115115
}
116116
if (type.isVoid) return 'void';
117-
assert(false, 'Unrecognized type for UndefinedElementType');
117+
if (type.isBottom) return 'Never';
118+
assert(false,
119+
'Unrecognized type for UndefinedElementType: ${type.toString()}');
118120
return '';
119121
}
120122

0 commit comments

Comments
 (0)