angular/packages/compiler/test
JoostK db6cf7e7c1 fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809)
For two-way-bindings that use the banana-in-a-box syntax, the compiler
synthesizes an event assignment expression from the primary expression.
It is valid for the primary expression to be terminated by the non-null
operator, however naive string substitution is used for the synthesized
expression, such that the `!` would immediately precede the `=` token,
resulting in the valid `!=` operator token. The expression would still
parse correctly but it doesn't implement the proper semantics, resulting
in incorrect runtime behavior.

Changing the expression substitution to force a space between the
primary expression and the assignment avoids this mistake, but it
uncovers a new issue. The grammar does not allow for the LHS of an
assignment to be the non-null operator, so the synthesized expression
would fail to parse. To alleviate this, the synthesized expression is
parsed with a special parser flag to allow for this syntax.

Fixes #36551

PR Close #37809
2022-02-07 10:46:52 -08:00
..
expression_parser fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809) 2022-02-07 10:46:52 -08:00
i18n test: remove view-engine-only tests (#43884) 2021-11-23 21:10:06 +00:00
ml_parser build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
output refactor(compiler): remove output AST functions (#44411) 2022-01-04 15:54:10 -08:00
render3 fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809) 2022-02-07 10:46:52 -08:00
schema test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
selector build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
compiler_facade_interface_spec.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
integration_spec.ts feat(core): update reference and doc to change async to waitAsync. (#37583) 2020-08-03 12:54:13 -07:00
shadow_css_spec.ts fix(compiler): preserve @page rules in encapsulated styles (#41915) 2021-05-06 09:33:56 -04:00
style_url_resolver_spec.ts refactor(compiler): make template preparser null-safe (#44411) 2022-01-04 15:54:10 -08:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00