angular/packages/compiler/test/render3
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
..
util refactor(compiler): remove parsing support for quote expressions (#44915) 2022-01-31 23:31:11 +00:00
view refactor(compiler): add @suppress {msgDescriptions} if no description is present on an i18n message (#44787) 2022-02-02 15:33:44 -08:00
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
r3_ast_absolute_span_spec.ts refactor(compiler): remove parsing support for quote expressions (#44915) 2022-01-31 23:31:11 +00:00
r3_ast_spans_spec.ts fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
r3_template_transform_spec.ts fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809) 2022-02-07 10:46:52 -08:00
README.md feat(compiler): implement "enableIvy" compiler option (#21427) 2018-01-18 18:22:44 -06:00
style_parser_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00

Tests in this directory are excluded from running in the browser and only run in node.