angular-cn/packages/compiler-cli/ngcc/test/integration
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
..
ngcc_spec.ts fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892) 2020-09-18 08:02:46 -07:00
util.ts fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892) 2020-09-18 08:02:46 -07:00