tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(20,22): error TS2322: Type '{ prop: "x"; children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
  Type '{ prop: "x"; children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; }' is not assignable to type 'LitProps<"x">'.
    Types of property 'children' are incompatible.
      Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x">) => "x"'.
        Type '"y"' is not assignable to type '"x"'.
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,27): error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
  Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
    Types of property 'children' are incompatible.
      Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
        Types of parameters 'p' and 'x' are incompatible.
          Type 'LitProps<"x" | "y">' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
            Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
              Types of property 'prop' are incompatible.
                Type '"x" | "y"' is not assignable to type '"x"'.
                  Type '"y"' is not assignable to type '"x"'.
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(22,29): error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
  Type '{ children: () => number; prop: "x"; }' is not assignable to type 'LitProps<"x">'.
    Types of property 'children' are incompatible.
      Type '() => number' is not assignable to type '(x: LitProps<"x">) => "x"'.
        Type 'number' is not assignable to type '"x"'.


==== tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx (3 errors) ====
    namespace JSX {
        export interface Element {}
        export interface ElementAttributesProperty { props: {}; }
        export interface ElementChildrenAttribute { children: {}; }
        export interface IntrinsicAttributes {}
        export interface IntrinsicElements { [key: string]: Element }
    }
    const Elem = <T,U=never>(p: { prop: T, children: (t: T) => T }) => <div></div>;
    Elem({prop: {a: "x"}, children: i => ({a: "z"})});
    const q = <Elem prop={{a: "x"}} children={i => ({a: "z"})} />
    const qq = <Elem prop={{a: "x"}}>{i => ({a: "z"})}</Elem>
    
    interface LitProps<T> { prop: T, children: (x: this) => T }
    const ElemLit = <T extends string>(p: LitProps<T>) => <div></div>;
    ElemLit({prop: "x", children: () => "x"});
    const j = <ElemLit prop="x" children={() => "x"} />
    const jj = <ElemLit prop="x">{() => "x"}</ElemLit>
    
    // Should error
    const arg = <ElemLit prop="x" children={p => "y"} />
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ prop: "x"; children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
!!! error TS2322:   Type '{ prop: "x"; children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; }' is not assignable to type 'LitProps<"x">'.
!!! error TS2322:     Types of property 'children' are incompatible.
!!! error TS2322:       Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x">) => "x"'.
!!! error TS2322:         Type '"y"' is not assignable to type '"x"'.
    const argchild = <ElemLit prop="x">{p => "y"}</ElemLit>
                              ~~~~~~~~
!!! error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
!!! error TS2322:   Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
!!! error TS2322:     Types of property 'children' are incompatible.
!!! error TS2322:       Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
!!! error TS2322:         Types of parameters 'p' and 'x' are incompatible.
!!! error TS2322:           Type 'LitProps<"x" | "y">' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
!!! error TS2322:             Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
!!! error TS2322:               Types of property 'prop' are incompatible.
!!! error TS2322:                 Type '"x" | "y"' is not assignable to type '"x"'.
!!! error TS2322:                   Type '"y"' is not assignable to type '"x"'.
    const mismatched = <ElemLit prop="x">{() => 12}</ElemLit>
                                ~~~~~~~~
!!! error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
!!! error TS2322:   Type '{ children: () => number; prop: "x"; }' is not assignable to type 'LitProps<"x">'.
!!! error TS2322:     Types of property 'children' are incompatible.
!!! error TS2322:       Type '() => number' is not assignable to type '(x: LitProps<"x">) => "x"'.
!!! error TS2322:         Type 'number' is not assignable to type '"x"'.