-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimehotlist: components teamRelated to Angular CDK or Angular MaterialRelated to Angular CDK or Angular MaterialregressionIndicates than the issue relates to something that worked in a previous versionIndicates than the issue relates to something that worked in a previous version
Description
Steps to reproduce
- Clone https://github.com/jelbourn/material2/tree/importas-repro
npm i- Run
gulp e2e
After this runs once, you can re-run ngc as:
./node_modules/.bin/ngc -p ./dist/packages/e2e-app/tsconfig-build.json(gulp e2e will build all of the dependencies as well)
Expected
The e2e app compiles successfully (as with Angular 4)
Actual
ngc emits an error
e2e-app-module.ngfactory.ts(451,10): error TS2393: Duplicate function implementation.
e2e-app-module.ngfactory.ts(454,10): error TS2393: Duplicate function implementation.
e2e-app-module.ngfactory.ts(458,10): error TS2393: Duplicate function implementation.
e2e-app-module.ngfactory.ts(461,10): error TS2393: Duplicate function implementation.
The file e2e-app-module.ngfactory.ts is not written to the file system.
Commentary
E2eAppModule declares (and marks as entryComponents) two classes both called TestDialog. In the module file, they are imported like:
import {TestDialog} from './dialog/dialog-e2e';
import {TestDialog as TestDialogFullScreen} from './fullscreen/fullscreen-e2e';Renaming one of them resolves the error.
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimehotlist: components teamRelated to Angular CDK or Angular MaterialRelated to Angular CDK or Angular MaterialregressionIndicates than the issue relates to something that worked in a previous versionIndicates than the issue relates to something that worked in a previous version