Skip to content

Commit b14d571

Browse files
Googlercopybara-github
Googler
authored andcommitted
Fix for InvalidType
PiperOrigin-RevId: 532062787
1 parent 51a7728 commit b14d571

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/builder.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,6 +2046,9 @@ class _MockClassInfo {
20462046
if (overrideVoid && type.isVoid) {
20472047
return TypeReference((b) => b..symbol = 'dynamic');
20482048
}
2049+
if (type is analyzer.InvalidType) {
2050+
return TypeReference((b) => b..symbol = 'dynamic');
2051+
}
20492052
if (type is analyzer.InterfaceType) {
20502053
return TypeReference((b) {
20512054
b
@@ -2238,6 +2241,8 @@ extension on analyzer.DartType {
22382241
final self = this;
22392242
if (self is analyzer.DynamicType) {
22402243
return false;
2244+
} else if (self is analyzer.InvalidType) {
2245+
return false;
22412246
} else if (self is analyzer.InterfaceType) {
22422247
return self.element.isPrivate ||
22432248
self.typeArguments.any((t) => t.containsPrivateName);

0 commit comments

Comments
 (0)