@@ -1105,6 +1105,8 @@ import {
11051105 WideningContext,
11061106 WithStatement,
11071107 YieldExpression,
1108+ LazyNodeCheckFlags,
1109+ isClassElement,
11081110} from "./_namespaces/ts.js";
11091111import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js";
11101112import * as performance from "./_namespaces/ts.performance.js";
@@ -29272,9 +29274,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2927229274 if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) {
2927329275 return markJsxAliasReferenced(location);
2927429276 }
29275- if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
29276- return markAsyncFunctionAliasReferenced(location);
29277- }
2927829277 if (isImportEqualsDeclaration(location)) {
2927929278 if (isInternalModuleImportEqualsDeclaration(location) || checkExternalImportOrExportDeclaration(location)) {
2928029279 return markImportEqualsAliasReferenced(location);
@@ -29284,6 +29283,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2928429283 if (isExportSpecifier(location)) {
2928529284 return markExportSpecifierAliasReferenced(location);
2928629285 }
29286+ if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
29287+ markAsyncFunctionAliasReferenced(location);
29288+ // Might be decorated, fall through to decorator final case
29289+ }
2928729290 if (!compilerOptions.emitDecoratorMetadata) {
2928829291 return;
2928929292 }
@@ -29726,7 +29729,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2972629729 addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText as string);
2972729730 }
2972829731
29729- let declaration = localOrExportSymbol.valueDeclaration;
29732+ const declaration = localOrExportSymbol.valueDeclaration;
2973029733 if (declaration && localOrExportSymbol.flags & SymbolFlags.Class) {
2973129734 // When we downlevel classes we may emit some code outside of the class body. Due to the fact the
2973229735 // class name is double-bound, we must ensure we mark references to the class name so that we can
@@ -48784,7 +48787,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4878448787 function checkSingleIdentifier(node: Node) {
4878548788 const nodeLinks = getNodeLinks(node);
4878648789 nodeLinks.calculatedFlags |= NodeCheckFlags.ConstructorReference | NodeCheckFlags.CapturedBlockScopedBinding | NodeCheckFlags.BlockScopedBindingInLoop;
48787- if (isIdentifier(node) && isExpressionNode(node) && !isPropertyAccessExpression(node.parent)) {
48790+ if (isIdentifier(node) && isExpressionNode(node) && !( isPropertyAccessExpression(node.parent) && node.parent.name === node )) {
4878848791 const s = getSymbolAtLocation(node, /*ignoreErrors*/ true);
4878948792 if (s && s !== unknownSymbol) {
4879048793 checkIdentifierCalculateNodeCheckFlags(node, s);
@@ -48811,7 +48814,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4881148814 checkComputedPropertyName(node);
4881248815 }
4881348816 if (isPrivateIdentifier(node) && isClassElement(node.parent)) {
48814- setNodeLinksForPrivateIdentifier (node, node .parent);
48817+ setNodeLinksForPrivateIdentifierScope (node.parent as PropertyDeclaration | PropertySignature | MethodDeclaration | MethodSignature | AccessorDeclaration );
4881548818 }
4881648819 }
4881748820 }
0 commit comments