Skip to content

Commit

Permalink
fix: defer inheritance collection more
Browse files Browse the repository at this point in the history
  • Loading branch information
0x706b committed Apr 23, 2023
1 parent 0a3a616 commit 61bf488
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/compiler/checker.ts
Expand Up @@ -50188,7 +50188,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
} else if (isCallExpression(node.expression)) {
const resolvedSignature = getResolvedSignature(node.expression);
const returnType = resolvedSignature.resolvedReturnType
const returnType = getReturnTypeOfSignature(resolvedSignature);
if (returnType) {
if (returnType.symbol) {
heritageExtensions.add(returnType.symbol);
Expand Down Expand Up @@ -50974,16 +50974,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
})
unresolvedTypeDeclarations.clear();

unresolvedUnionInheritance.forEach((types, type) => {
tryCacheUnionInheritance(types, type);
});
unresolvedUnionInheritance.clear();

unresolvedInheritance.forEach((heritageClauses, symbol) => {
tryCacheTsPlusInheritance(symbol, heritageClauses);
});
unresolvedInheritance.clear()

unresolvedCompanionDeclarations.forEach((declaration) => {
const tags = collectTsPlusCompanionTags(declaration);
const type = getTypeOfNode(declaration)
Expand Down Expand Up @@ -51206,6 +51196,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
extensions.sort(({ priority: x }, { priority: y }) => x > y ? 1 : x < y ? -1 : 0)
})
})

unresolvedUnionInheritance.forEach((types, type) => {
tryCacheUnionInheritance(types, type);
});
unresolvedUnionInheritance.clear();

unresolvedInheritance.forEach((heritageClauses, symbol) => {
tryCacheTsPlusInheritance(symbol, heritageClauses);
});
unresolvedInheritance.clear()

tsPlusDebug && console.timeEnd("initTsPlusTypeChecker joinining signatures")
tsPlusDebug && console.time("initTsPlusTypeChecker implicits")
initTsPlusTypeCheckerImplicits();
Expand Down

0 comments on commit 61bf488

Please sign in to comment.