angular-cn/packages/compiler-cli/ngcc/test/host
JoostK e4424863c2 fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892)
In #38666 we changed how ngcc deals with type expressions, where it
would now always emit the original type expression into the generated
code as a "local" type value reference instead of synthesizing new
imports using an "imported" type value reference. This was done as a fix
to properly deal with renamed symbols, however it turns out that the
compiler has special handling for certain imported symbols, e.g.
`ChangeDetectorRef` from `@angular/core`. The "local" type value
reference prevented this special logic from being hit, resulting in
incorrect compilation of pipe factories.

This commit fixes the issue by manually inspecting the import of the
type expression, in order to return an "imported" type value reference.
By manually inspecting the import we continue to handle renamed symbols.

Fixes #38883

PR Close #38892
2020-09-18 08:02:46 -07:00
..
commonjs_host_import_helper_spec.ts refactor(ngcc): move `logging` code into `ngtsc` (#37114) 2020-06-22 13:38:47 -07:00
commonjs_host_spec.ts fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892) 2020-09-18 08:02:46 -07:00
esm5_host_import_helper_spec.ts fix(compiler-cli): avoid creating value expressions for symbols from type-only imports (#37912) 2020-08-11 09:53:25 -07:00
esm5_host_spec.ts fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892) 2020-09-18 08:02:46 -07:00
esm2015_host_import_helper_spec.ts fix(compiler-cli): avoid creating value expressions for symbols from type-only imports (#37912) 2020-08-11 09:53:25 -07:00
esm2015_host_spec.ts fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892) 2020-09-18 08:02:46 -07:00
umd_host_import_helper_spec.ts refactor(ngcc): move `logging` code into `ngtsc` (#37114) 2020-06-22 13:38:47 -07:00
umd_host_spec.ts fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892) 2020-09-18 08:02:46 -07:00
util.ts fix(ngcc): use aliased exported types correctly (#38666) 2020-09-08 11:41:21 -07:00