diff --git a/packages/compiler/src/aot/static_reflector.ts b/packages/compiler/src/aot/static_reflector.ts index 6af817f97b..bb97bd1676 100644 --- a/packages/compiler/src/aot/static_reflector.ts +++ b/packages/compiler/src/aot/static_reflector.ts @@ -601,7 +601,7 @@ export class StaticReflector implements ɵReflectorReader { case 'ignore': return expression; } - return IGNORE; + return null; } return mapStringMap(expression, (value, name) => simplify(value)); } diff --git a/packages/compiler/test/aot/static_reflector_spec.ts b/packages/compiler/test/aot/static_reflector_spec.ts index 9ea0ffda15..dd6fc683b3 100644 --- a/packages/compiler/test/aot/static_reflector_spec.ts +++ b/packages/compiler/test/aot/static_reflector_spec.ts @@ -546,30 +546,6 @@ describe('StaticReflector', () => { expect(annotation.providers).toEqual([1, 2, 3, 4, 5, 6, 7]); }); - it('should ignore unresolved calls', () => { - const data = Object.create(DEFAULT_TEST_DATA); - const file = '/tmp/src/invalid-component.ts'; - data[file] = ` - import {Component} from '@angular/core'; - import {unknown} from 'unresolved'; - - @Component({ - selector: 'tmp', - template: () => {}, - providers: [triggers()] - }) - export class BadComponent { - - } - `; - init(data, [], () => {}, {verboseInvalidExpression: true}); - - const badComponent = reflector.getStaticSymbol(file, 'BadComponent'); - const annotations = reflector.annotations(badComponent); - const annotation = annotations[0]; - expect(annotation.providers).toEqual([]); - }); - describe('inheritance', () => { class ClassDecorator { constructor(public value: any) {} diff --git a/packages/compiler/test/aot/static_symbol_resolver_spec.ts b/packages/compiler/test/aot/static_symbol_resolver_spec.ts index 944d6c503c..9adfc0ebdf 100644 --- a/packages/compiler/test/aot/static_symbol_resolver_spec.ts +++ b/packages/compiler/test/aot/static_symbol_resolver_spec.ts @@ -436,9 +436,6 @@ export class MockStaticSymbolResolverHost implements StaticSymbolResolverHost { } return baseName + '.d.ts'; } - if (modulePath == 'unresolved') { - return undefined; - } return '/tmp/' + modulePath + '.d.ts'; }