diff --git a/modules/@angular/compiler-cli/src/static_reflector.ts b/modules/@angular/compiler-cli/src/static_reflector.ts index 1d221cea85..5e92309ab9 100644 --- a/modules/@angular/compiler-cli/src/static_reflector.ts +++ b/modules/@angular/compiler-cli/src/static_reflector.ts @@ -368,6 +368,9 @@ export class StaticReflector implements ReflectorReader { } return result; } + if (expression instanceof StaticSymbol) { + return expression; + } if (expression) { if (expression['__symbolic']) { let staticSymbol: StaticSymbol; diff --git a/modules/@angular/compiler-cli/test/static_reflector_spec.ts b/modules/@angular/compiler-cli/test/static_reflector_spec.ts index d909324ebf..fe6733321f 100644 --- a/modules/@angular/compiler-cli/test/static_reflector_spec.ts +++ b/modules/@angular/compiler-cli/test/static_reflector_spec.ts @@ -119,6 +119,11 @@ describe('StaticReflector', () => { expect(simplify(noContext, 'some value')).toBe('some value'); }); + it('should simplify a static symbol into itself', () => { + const staticSymbol = new StaticSymbol('', ''); + expect(simplify(noContext, staticSymbol)).toBe(staticSymbol); + }); + it('should simplify an array into a copy of the array', () => { expect(simplify(noContext, [1, 2, 3])).toEqual([1, 2, 3]); });