additionOperatorWithNullValueAndInvalidOperator.ts(11,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(12,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(13,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(14,14): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(15,14): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(16,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(19,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(20,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(21,10): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(22,11): error TS18050: The value 'null' cannot be used here.
additionOperatorWithNullValueAndInvalidOperator.ts(23,11): error TS18050: The value 'null' cannot be used here.


==== additionOperatorWithNullValueAndInvalidOperator.ts (11 errors) ====
    // If one operand is the null or undefined value, it is treated as having the type of the other operand.
    
    function foo(): void { return undefined }
    
    declare var a: boolean;
    declare var b: Object;
    declare var c: void;
    declare var d: Number;
    
    // null + boolean/Object
    var r1 = null + a;
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r2 = null + b;
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r3 = null + c;
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r4 = a + null;
                 ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r5 = b + null;
                 ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r6 = null + c;
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    
    // other cases
    var r7 = null + d;
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r8 = null + true;
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r9 = null + { a: '' };
             ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r10 = null + foo();
              ~~~~
!!! error TS18050: The value 'null' cannot be used here.
    var r11 = null + (() => { });
              ~~~~
!!! error TS18050: The value 'null' cannot be used here.