Skip to content
Prev Previous commit
Next Next commit
Revise assert
  • Loading branch information
weswigham committed May 3, 2024
commit 328d7f0729ba08694f7ae2847fb14ab060fce03c
8 changes: 4 additions & 4 deletions src/compiler/transformers/declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1007,11 +1007,11 @@ export function transformDeclarations(context: TransformationContext) {
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));
}
if (!isEntityNameExpression(input.name.expression)) {
// A.B.C that is not late bound - usually this means the expression did not resolve.
// Check the entity name, and copy the declaration, rather than elide it (there's
// probably a checker error in the input, but this is most likely the desired output).
return;
}
// A.B.C that is not late bound - usually this means the expression did not resolve.
// Check the entity name, and copy the declaration, rather than elide it (there's
// probably a checker error in the input, but this is most likely the desired output).
}
}

Expand Down Expand Up @@ -1783,7 +1783,7 @@ export function transformDeclarations(context: TransformationContext) {
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNodeName(node);
}
errorNameNode = (node as NamedDeclaration).name;
Debug.assert(resolver.isLateBound(getParseTreeNode(node) as Declaration)); // Should only be called with dynamic names
Debug.assert(hasDynamicName(node as NamedDeclaration)); // Should only be called with dynamic names
const decl = node as NamedDeclaration as LateBoundDeclaration;
const entityName = decl.name.expression;
checkEntityNameVisibility(entityName, enclosingDeclaration);
Expand Down