comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(14,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(14,15): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(15,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(15,15): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(18,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(18,15): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(19,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(19,15): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(22,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(22,16): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(23,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(23,16): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(26,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(26,16): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(27,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(27,16): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(30,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(30,16): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(31,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(31,16): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(34,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(34,16): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(35,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(35,16): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(38,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(38,17): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(39,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(39,17): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(42,11): error TS2454: Variable 'a' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(42,17): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(43,11): error TS2454: Variable 'b' is used before being assigned.
comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts(43,17): error TS2454: Variable 'a' is used before being assigned.


==== comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts (32 errors) ====
    interface I {
        a: string;
        b?: number;
    }
    
    interface J {
        a: string;
    }
    
    var a: I;
    var b: J;
    
    // operator <
    var ra1 = a < b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                  ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var ra2 = b < a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                  ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator >
    var rb1 = a > b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                  ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var rb2 = b > a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                  ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator <=
    var rc1 = a <= b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                   ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var rc2 = b <= a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                   ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator >=
    var rd1 = a >= b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                   ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var rd2 = b >= a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                   ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator ==
    var re1 = a == b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                   ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var re2 = b == a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                   ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator !=
    var rf1 = a != b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                   ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var rf2 = b != a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                   ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator ===
    var rg1 = a === b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                    ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var rg2 = b === a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                    ~
!!! error TS2454: Variable 'a' is used before being assigned.
    
    // operator !==
    var rh1 = a !== b;
              ~
!!! error TS2454: Variable 'a' is used before being assigned.
                    ~
!!! error TS2454: Variable 'b' is used before being assigned.
    var rh2 = b !== a;
              ~
!!! error TS2454: Variable 'b' is used before being assigned.
                    ~
!!! error TS2454: Variable 'a' is used before being assigned.