https://github.com/angular/angular
Revision 093c3a10f614972bddf3ba0d88e2a66845be9732 authored by JoostK on 17 September 2020, 18:40:35 UTC, committed by Misko Hevery on 18 September 2020, 15:02:50 UTC
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
1 parent a0756e9
History
Tip revision: 093c3a10f614972bddf3ba0d88e2a66845be9732 authored by JoostK on 17 September 2020, 18:40:35 UTC
fix(ngcc): fix compilation of `ChangeDetectorRef` in pipe constructors (#38892)
Tip revision: 093c3a1
File Mode Size
.circleci
.devcontainer
.github
.ng-dev
.vscode
.yarn
aio
dev-infra
docs
goldens
integration
modules
packages
scripts
third_party
tools
.bazelignore -rw-r--r-- 4.3 KB
.bazelrc -rw-r--r-- 6.2 KB
.bazelversion -rw-r--r-- 213 bytes
.clang-format -rw-r--r-- 73 bytes
.editorconfig -rw-r--r-- 245 bytes
.gitattributes -rw-r--r-- 314 bytes
.gitignore -rw-r--r-- 773 bytes
.gitmessage -rw-r--r-- 7.2 KB
.mailmap -rw-r--r-- 51 bytes
.nvmrc -rw-r--r-- 8 bytes
.pullapprove.yml -rw-r--r-- 44.7 KB
.yarnrc -rw-r--r-- 128 bytes
BUILD.bazel -rw-r--r-- 1.7 KB
CHANGELOG.md -rw-r--r-- 725.5 KB
CODE_OF_CONDUCT.md -rw-r--r-- 1.1 KB
CONTRIBUTING.md -rw-r--r-- 14.1 KB
LICENSE -rw-r--r-- 1.1 KB
README.md -rw-r--r-- 1.2 KB
WORKSPACE -rw-r--r-- 4.3 KB
browser-providers.conf.js -rw-r--r-- 9.1 KB
gulpfile.js -rw-r--r-- 1.2 KB
karma-js.conf.js -rw-r--r-- 7.8 KB
package.json -rw-r--r-- 8.8 KB
test-events.js -rw-r--r-- 259 bytes
test-main.js -rw-r--r-- 11.4 KB
tslint.json -rw-r--r-- 2.3 KB
yarn.lock -rw-r--r-- 680.1 KB
yarn.lock.readme.md -rw-r--r-- 1.3 KB

README.md

back to top