TypeScript/tests/baselines/reference/operatorAddNullUndefined.errors.txt
2014-09-12 13:35:07 -07:00

32 lines
1.5 KiB
Plaintext

tests/cases/compiler/operatorAddNullUndefined.ts(2,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
tests/cases/compiler/operatorAddNullUndefined.ts(3,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
tests/cases/compiler/operatorAddNullUndefined.ts(4,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
tests/cases/compiler/operatorAddNullUndefined.ts(5,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
==== tests/cases/compiler/operatorAddNullUndefined.ts (4 errors) ====
enum E { x }
var x1 = null + null;
~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
var x2 = null + undefined;
~~~~~~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
var x3 = undefined + null;
~~~~~~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
var x4 = undefined + undefined;
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
var x5 = 1 + null;
var x6 = 1 + undefined;
var x7 = null + 1;
var x8 = undefined + 1;
var x9 = "test" + null;
var x10 = "test" + undefined;
var x11 = null + "test";
var x12 = undefined + "test";
var x13 = null + E.x
var x14 = undefined + E.x
var x15 = E.x + null
var x16 = E.x + undefined