angular-cn/packages/compiler-cli/test/ngtsc
Kristiyan Kostadinov a61fe96b70 fix(compiler-cli): incorrectly type checking calls to implicit template variables (#39686)
Currently when we encounter an implicit method call (e.g. `{{ foo(1) }}`) and we manage to resolve
its receiver to something within the template, we assume that the method is on the receiver itself
so we generate a type checking code to reflect it. This assumption is true in most cases, but it
breaks down if the call is on an implicit receiver and the receiver itself is being invoked. E.g.

```
<div *ngFor="let fn of functions">{{ fn(1) }}</div>
```

These changes resolve the issue by generating a regular function call if the method call's receiver
is pointing to `$implicit`.

Fixes #39634.

PR Close #39686
2020-11-16 09:36:10 -08:00
..
fake_core feat(core): remove ViewEncapsulation.Native (#38882) 2020-10-08 11:56:03 -07:00
BUILD.bazel refactor(compiler-cli): implement `DeclarationNode` node type (#38959) 2020-10-12 08:32:46 -07:00
component_indexing_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
env.ts refactor(compiler-cli): implement `DeclarationNode` node type (#38959) 2020-10-12 08:32:46 -07:00
incremental_error_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
incremental_spec.ts test(compiler-cli): fix tests to have at least one component (#39011) 2020-09-28 16:27:34 -04:00
modulewithproviders_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
monorepo_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ngtsc_spec.ts fix(compiler-cli): setComponentScope should only list used components/pipes (#39662) 2020-11-13 11:57:20 -08:00
scope_spec.ts feat(compiler-cli): explain why an expression cannot be used in AOT compilations (#37587) 2020-06-25 14:16:35 -07:00
sourcemap_utils.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_mapping_spec.ts fix(compiler-cli): compute source-mappings for localized strings (#38645) 2020-09-08 13:17:21 -07:00
template_typecheck_spec.ts fix(compiler-cli): incorrectly type checking calls to implicit template variables (#39686) 2020-11-16 09:36:10 -08:00