fix(compiler-cli): do not fold errors past calls in the collector (#21708)
Folding errors passed calls prevented the static reflector from begin able to ignore errors in annotations it doesn't know as the call to the unknown annotation was elided from the metadata. Fixes: #21273 PR Close #21708
This commit is contained in:

committed by
Miško Hevery

parent
e82812b9a9
commit
dd8679037e
@ -289,7 +289,7 @@ export class MetadataCollector {
|
||||
ts.TypeAliasDeclaration | ts.EnumDeclaration) => exportedIdentifierName(node.name);
|
||||
|
||||
|
||||
// Predeclare classes and functions
|
||||
// Pre-declare classes and functions
|
||||
ts.forEachChild(sourceFile, node => {
|
||||
switch (node.kind) {
|
||||
case ts.SyntaxKind.ClassDeclaration:
|
||||
@ -454,7 +454,7 @@ export class MetadataCollector {
|
||||
};
|
||||
} else {
|
||||
nextDefaultValue =
|
||||
recordEntry(errorSym('Unsuppported enum member name', member.name), node);
|
||||
recordEntry(errorSym('Unsupported enum member name', member.name), node);
|
||||
}
|
||||
}
|
||||
if (writtenMembers) {
|
||||
|
@ -356,9 +356,6 @@ export class Evaluator {
|
||||
}
|
||||
}
|
||||
const args = arrayOrEmpty(callExpression.arguments).map(arg => this.evaluateNode(arg));
|
||||
if (!this.options.verboseInvalidExpression && args.some(isMetadataError)) {
|
||||
return args.find(isMetadataError);
|
||||
}
|
||||
if (this.isFoldable(callExpression)) {
|
||||
if (isMethodCallOf(callExpression, 'concat')) {
|
||||
const arrayValue = <MetadataValue[]>this.evaluateNode(
|
||||
|
Reference in New Issue
Block a user