indexedAccessRelation.ts(16,25): error TS2322: Type 'T' is not assignable to type '(S & State<T>)["a"] | undefined'.
  Type 'Foo' is not assignable to type 'S["a"] & (T | undefined)'.


==== indexedAccessRelation.ts (1 errors) ====
    // Repro from #14723
    
    class Component<S> {
        setState<K extends keyof S>(state: Pick<S, K>) {}
    }
    
    export interface State<T> {
        a?: T;
    }
    
    class Foo {}
    
    class Comp<T extends Foo, S> extends Component<S & State<T>>
    {
        foo(a: T) {
            this.setState({ a: a });
                            ~
!!! error TS2322: Type 'T' is not assignable to type '(S & State<T>)["a"] | undefined'.
!!! error TS2322:   Type 'Foo' is not assignable to type 'S["a"] & (T | undefined)'.
!!! related TS6500 indexedAccessRelation.ts:8:5: The expected type comes from property 'a' which is declared here on type 'Pick<S & State<T>, "a">'
        }
    }
    