Skip to content

Commit b869290

Browse files
committed
Remove unnecessary caching of substitution types
1 parent f19959a commit b869290

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

src/compiler/checker.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ namespace ts {
303303
const literalTypes = createMap<LiteralType>();
304304
const indexedAccessTypes = createMap<IndexedAccessType>();
305305
const conditionalTypes = createMap<ConditionalType>();
306-
const substitutionTypes = createMap<SubstitutionType>();
307306
const evolvingArrayTypes: EvolvingArrayType[] = [];
308307
const undefinedProperties = createMap<Symbol>() as UnderscoreEscapedMap<Symbol>;
309308

@@ -7156,15 +7155,9 @@ namespace ts {
71567155
}
71577156

71587157
function getSubstitutionType(typeParameter: TypeParameter, substitute: Type) {
7159-
const id = typeParameter.id + "," + substitute.id;
7160-
const cached = substitutionTypes.get(id);
7161-
if (cached) {
7162-
return cached;
7163-
}
71647158
const result = <SubstitutionType>createType(TypeFlags.Substitution);
71657159
result.typeParameter = typeParameter;
71667160
result.substitute = substitute;
7167-
substitutionTypes.set(id, result);
71687161
return result;
71697162
}
71707163

0 commit comments

Comments
 (0)