@@ -1105,6 +1105,8 @@ import {
1105
1105
WideningContext,
1106
1106
WithStatement,
1107
1107
YieldExpression,
1108
+ LazyNodeCheckFlags,
1109
+ isClassElement,
1108
1110
} from "./_namespaces/ts.js";
1109
1111
import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js";
1110
1112
import * as performance from "./_namespaces/ts.performance.js";
@@ -29272,9 +29274,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
29272
29274
if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) {
29273
29275
return markJsxAliasReferenced(location);
29274
29276
}
29275
- if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
29276
- return markAsyncFunctionAliasReferenced(location);
29277
- }
29278
29277
if (isImportEqualsDeclaration(location)) {
29279
29278
if (isInternalModuleImportEqualsDeclaration(location) || checkExternalImportOrExportDeclaration(location)) {
29280
29279
return markImportEqualsAliasReferenced(location);
@@ -29284,6 +29283,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
29284
29283
if (isExportSpecifier(location)) {
29285
29284
return markExportSpecifierAliasReferenced(location);
29286
29285
}
29286
+ if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
29287
+ markAsyncFunctionAliasReferenced(location);
29288
+ // Might be decorated, fall through to decorator final case
29289
+ }
29287
29290
if (!compilerOptions.emitDecoratorMetadata) {
29288
29291
return;
29289
29292
}
@@ -29726,7 +29729,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
29726
29729
addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText as string);
29727
29730
}
29728
29731
29729
- let declaration = localOrExportSymbol.valueDeclaration;
29732
+ const declaration = localOrExportSymbol.valueDeclaration;
29730
29733
if (declaration && localOrExportSymbol.flags & SymbolFlags.Class) {
29731
29734
// When we downlevel classes we may emit some code outside of the class body. Due to the fact the
29732
29735
// 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 {
48784
48787
function checkSingleIdentifier(node: Node) {
48785
48788
const nodeLinks = getNodeLinks(node);
48786
48789
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 )) {
48788
48791
const s = getSymbolAtLocation(node, /*ignoreErrors*/ true);
48789
48792
if (s && s !== unknownSymbol) {
48790
48793
checkIdentifierCalculateNodeCheckFlags(node, s);
@@ -48811,7 +48814,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48811
48814
checkComputedPropertyName(node);
48812
48815
}
48813
48816
if (isPrivateIdentifier(node) && isClassElement(node.parent)) {
48814
- setNodeLinksForPrivateIdentifier (node, node .parent);
48817
+ setNodeLinksForPrivateIdentifierScope (node.parent as PropertyDeclaration | PropertySignature | MethodDeclaration | MethodSignature | AccessorDeclaration );
48815
48818
}
48816
48819
}
48817
48820
}
0 commit comments