fix(compiler): generate safe access strictNullChecks compatible code (#12800)

fixes #12795
This commit is contained in:
Chuck Jazdzewski
2016-11-11 17:12:17 -08:00
committed by Victor Berchet
parent 52be848f94
commit a965d11cce
3 changed files with 8 additions and 4 deletions

View File

@ -110,6 +110,7 @@ export function main() {
it('should support blank literals', () => {
expect(emitStmt(o.literal(null).toStmt())).toEqual('(null as any);');
expect(emitStmt(o.literal(undefined).toStmt())).toEqual('(undefined as any);');
expect(emitStmt(o.variable('a', null).isBlank().toStmt())).toEqual('(a == null);');
});
it('should support external identifiers', () => {