angular/packages/compiler-cli
Paul Gschwendtner 69a83993b3 fix(compiler-cli): do not throw when retrieving TCB symbol for signal input with restricted access (#55774)
Currently when attempting to retrieve a TCB symbol for an input binding
that refers to a signal input with e.g. `protected`, while the
`honorAccessModifiersForInputBindings` flag is `false`, 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.

PR Close #55774
2024-05-16 09:33:02 -07:00
..
integrationtest refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:45 -07:00
linker refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:45 -07:00
ngcc refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:45 -07:00
private refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:45 -07:00
src fix(compiler-cli): do not throw when retrieving TCB symbol for signal input with restricted access (#55774) 2024-05-16 09:33:02 -07:00
test refactor(core): clean up clang comments and workarounds (#55750) 2024-05-13 11:10:36 -07:00
BUILD.bazel refactor(compiler-cli): add transform to support signal input in JIT (#53808) 2024-01-10 12:21:05 +00:00
esbuild.config.js refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:45 -07:00
index.ts refactor(compiler-cli): support extracting initializer API functions (#54925) 2024-03-26 09:17:20 -07:00
package.json build: update babel dependencies to v7.24.4 (#55257) 2024-04-12 10:21:24 -07:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00