tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(10,11): error TS2429: Interface 'S' incorrectly extends interface 'T':
  Required property 'Foo' cannot be reimplemented with optional property in 'S'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(18,11): error TS2429: Interface 'S2' incorrectly extends interface 'T2':
  Required property '1' cannot be reimplemented with optional property in 'S2'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(26,11): error TS2429: Interface 'S3' incorrectly extends interface 'T3':
  Required property '1' cannot be reimplemented with optional property in 'S3'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts(33,9): error TS2367: No best common type exists between '{ Foo: Base; }' and '{ Foo?: Derived; }'.


==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts (4 errors) ====
    // Derived member is optional but base member is not, should be an error
    
    interface Base { foo: string; }
    interface Derived extends Base { bar: string; }
    
    interface T {
        Foo: Base;
    }
    
    interface S extends T {
              ~
!!! error TS2429: Interface 'S' incorrectly extends interface 'T':
!!! error TS2429:   Required property 'Foo' cannot be reimplemented with optional property in 'S'.
        Foo?: Derived // error
    }
    
    interface T2 {
        1: Base;
    }
    
    interface S2 extends T2 {
              ~~
!!! error TS2429: Interface 'S2' incorrectly extends interface 'T2':
!!! error TS2429:   Required property '1' cannot be reimplemented with optional property in 'S2'.
        1?: Derived; // error
    }
    
    interface T3 {
        '1': Base;
    }
    
    interface S3 extends T3 {
              ~~
!!! error TS2429: Interface 'S3' incorrectly extends interface 'T3':
!!! error TS2429:   Required property '1' cannot be reimplemented with optional property in 'S3'.
        '1'?: Derived; // error
    }
    
    // object literal case
    var a: { Foo: Base; }
    var b: { Foo?: Derived; }
    var r = true ? a : b; // error
            ~~~~~~~~~~~~
!!! error TS2367: No best common type exists between '{ Foo: Base; }' and '{ Foo?: Derived; }'.