fix(compiler-cli): do not throw when retrieving TCB symbol for signal input with restricted access #55774
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently when attempting to retrieve a TCB symbol for an input binding that refers to a signal input with e.g.
protected
, while thehonorAccessModifiersForInputBindings
flag isfalse
, Angular will throw a runtime exception because the symbol retrieval code always expects a proper field access in the TCB.This is not the case with
honorAccessModifiersForInputBindings = false
, as TCB will allocate a temporary variable when ignoring the field access. This will then trigger the runtime exception (which we added to flag such "unexpected" cases). This commit handles it gracefully, as it's valid TCB, but we simply cannot generate a proper TCB symbol (yet). This is similar to@Input
decorator inputs.In the future we may implement logic to build up TCB symbols for non-property access bindings, for both signal inputs or
@Input
inputs. This commit just avoids a build exception.Related to: #54324.