@@ -20198,21 +20198,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
20198
20198
}
20199
20199
const id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
20200
20200
const entry = enumRelation.get(id);
20201
- if (entry !== undefined && !(!(entry & RelationComparisonResult.Reported) && entry & RelationComparisonResult.Failed && errorReporter)) {
20201
+ if (entry !== undefined && !(entry & RelationComparisonResult.Failed && errorReporter)) {
20202
20202
return !!(entry & RelationComparisonResult.Succeeded);
20203
20203
}
20204
20204
const targetEnumType = getTypeOfSymbol(targetSymbol);
20205
20205
for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
20206
20206
if (property.flags & SymbolFlags.EnumMember) {
20207
20207
const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
20208
20208
if (!targetProperty || !(targetProperty.flags & SymbolFlags.EnumMember)) {
20209
+ enumRelation.set(id, RelationComparisonResult.Failed);
20210
+
20209
20211
if (errorReporter) {
20210
20212
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property),
20211
20213
typeToString(getDeclaredTypeOfSymbol(targetSymbol), /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType));
20212
- enumRelation.set(id, RelationComparisonResult.Failed | RelationComparisonResult.Reported);
20213
- }
20214
- else {
20215
- enumRelation.set(id, RelationComparisonResult.Failed);
20216
20214
}
20217
20215
return false;
20218
20216
}
@@ -21331,7 +21329,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
21331
21329
else {
21332
21330
// A false result goes straight into global cache (when something is false under
21333
21331
// assumptions it will also be false without assumptions)
21334
- relation.set(id, (reportErrors ? RelationComparisonResult.Reported : 0) | RelationComparisonResult.Failed | propagatingVarianceFlags);
21332
+ relation.set(id, RelationComparisonResult.Failed | propagatingVarianceFlags);
21335
21333
resetMaybeStack(/*markAllAsSucceeded*/ false);
21336
21334
}
21337
21335
return result;
0 commit comments