Skip to content

Commit 22520da

Browse files
committed
relax restrictiveMapper caching restriction
1 parent a040139 commit 22520da

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

src/compiler/checker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
21012101
var numericStringType = getTemplateLiteralType(["", ""], [numberType]); // The `${number}` type
21022102

21032103
var restrictiveMapper: TypeMapper = makeFunctionTypeMapper(t => t.flags & TypeFlags.TypeParameter ? getRestrictiveTypeParameter(t as TypeParameter) : t, () => "(restrictive mapper)");
2104-
restrictiveMapper.instantiations = voidMap;
21052104
var permissiveMapper: TypeMapper = makeFunctionTypeMapper(t => t.flags & TypeFlags.TypeParameter ? wildcardType : t, () => "(permissive mapper)");
21062105
var uniqueLiteralType = createIntrinsicType(TypeFlags.Never, "never", /*objectFlags*/ undefined, "unique literal"); // `uniqueLiteralType` is a special `never` flagged by union reduction to behave as a literal
21072106
var uniqueLiteralMapper: TypeMapper = makeFunctionTypeMapper(t => t.flags & TypeFlags.TypeParameter ? uniqueLiteralType : t, () => "(unique literal mapper)"); // replace all type parameters with the unique literal type (disregarding constraints)

tests/baselines/reference/circularBaseConstraint.types

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
//// [tests/cases/compiler/circularBaseConstraint.ts] ////
22

3-
=== Performance Stats ===
4-
Instantiation count: 2,500
5-
63
=== circularBaseConstraint.ts ===
74
// Repro from #54610
85

0 commit comments

Comments
 (0)