tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(18,3): error TS2416: Property 'render' in type 'FieldFeedback<P>' is not assignable to the same property in base type 'Component<P, {}, any>'.
  Type '() => Element' is not assignable to type '() => ReactNode'.
    The 'this' types of each signature are incompatible.
      Type 'Component<P, S, SS>' is not assignable to type 'FieldFeedback<P>'.
        Types of property 'render' are incompatible.
          Type '() => ReactNode' is not assignable to type '() => Element'.
            The 'this' types of each signature are incompatible.
              Type 'FieldFeedback<P>' is not assignable to type 'Component<P, S, SS>'.
                Types of property 'props' are incompatible.
                  Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>'. Two different types with this name exist, but they are unrelated.
                    Type 'Readonly<{ children?: ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<P>'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,36): error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the following error.
    Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
      Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
        Type 'void' is not assignable to type 'boolean'.
  Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
    Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(34,3): error TS2416: Property 'render' in type 'FieldFeedbackBeta<P>' is not assignable to the same property in base type 'Component<P, {}, any>'.
  Type '() => Element' is not assignable to type '() => ReactNode'.
    The 'this' types of each signature are incompatible.
      Type 'Component<P, S, SS>' is not assignable to type 'FieldFeedbackBeta<P>'.
        Types of property 'render' are incompatible.
          Type '() => ReactNode' is not assignable to type '() => Element'.
            The 'this' types of each signature are incompatible.
              Type 'FieldFeedbackBeta<P>' is not assignable to type 'Component<P, S, SS>'.
                Types of property 'props' are incompatible.
                  Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>'. Two different types with this name exist, but they are unrelated.
                    Type 'Readonly<{ children?: ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<P>'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,41): error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error.
    Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
      Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
        Type 'void' is not assignable to type 'boolean'.
  Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
    Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(54,3): error TS2416: Property 'render' in type 'FieldFeedback2<P>' is not assignable to the same property in base type 'FieldFeedback<P>'.
  Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated.
    The 'this' types of each signature are incompatible.
      Type 'FieldFeedback<P>' is not assignable to type 'FieldFeedback2<P>'.
        Types of property 'render' are incompatible.
          Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated.
            The 'this' types of each signature are incompatible.
              Type 'FieldFeedback2<P>' is not assignable to type 'FieldFeedback<P>'.
                Types of property 'props' are incompatible.
                  Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>'. Two different types with this name exist, but they are unrelated.
                    Type 'Readonly<{ children?: ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<P>'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the following error.
    Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
      Type 'void' is not assignable to type 'boolean'.
  Overload 2 of 2, '(props: MyPropsProps, context?: any): FieldFeedback2<MyPropsProps>', gave the following error.
    Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.


==== tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx (6 errors) ====
    /// <reference path="/.lib/react16.d.ts" />
    
    import React from 'react';
    
    interface BaseProps {
      when?: ((value: string) => boolean) | "a" | "b";
      error?: boolean;
    }
    
    interface Props extends BaseProps {
    }
    
    class FieldFeedback<P extends Props = BaseProps> extends React.Component<P> {
      static defaultProps = {
        when: () => true
      };
    
      render() {
      ~~~~~~
!!! error TS2416: Property 'render' in type 'FieldFeedback<P>' is not assignable to the same property in base type 'Component<P, {}, any>'.
!!! error TS2416:   Type '() => Element' is not assignable to type '() => ReactNode'.
!!! error TS2416:     The 'this' types of each signature are incompatible.
!!! error TS2416:       Type 'Component<P, S, SS>' is not assignable to type 'FieldFeedback<P>'.
!!! error TS2416:         Types of property 'render' are incompatible.
!!! error TS2416:           Type '() => ReactNode' is not assignable to type '() => Element'.
!!! error TS2416:             The 'this' types of each signature are incompatible.
!!! error TS2416:               Type 'FieldFeedback<P>' is not assignable to type 'Component<P, S, SS>'.
!!! error TS2416:                 Types of property 'props' are incompatible.
!!! error TS2416:                   Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>'. Two different types with this name exist, but they are unrelated.
!!! error TS2416:                     Type 'Readonly<{ children?: ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<P>'.
        return <div>Hello</div>;
      }
    }
    
    // OK
    const Test1 = () => <FieldFeedback when={value => !!value} />;
    
    // Error: Void not assignable to boolean
    const Test2 = () => <FieldFeedback when={value => console.log(value)} />;
                                       ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the following error.
!!! error TS2769:     Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2769:       Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769:         Type 'void' is not assignable to type 'boolean'.
!!! error TS2769:   Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
!!! error TS2769:     Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
    
    class FieldFeedbackBeta<P extends Props = BaseProps> extends React.Component<P> {
      static defaultProps: BaseProps = {
        when: () => true
      };
    
      render() {
      ~~~~~~
!!! error TS2416: Property 'render' in type 'FieldFeedbackBeta<P>' is not assignable to the same property in base type 'Component<P, {}, any>'.
!!! error TS2416:   Type '() => Element' is not assignable to type '() => ReactNode'.
!!! error TS2416:     The 'this' types of each signature are incompatible.
!!! error TS2416:       Type 'Component<P, S, SS>' is not assignable to type 'FieldFeedbackBeta<P>'.
!!! error TS2416:         Types of property 'render' are incompatible.
!!! error TS2416:           Type '() => ReactNode' is not assignable to type '() => Element'.
!!! error TS2416:             The 'this' types of each signature are incompatible.
!!! error TS2416:               Type 'FieldFeedbackBeta<P>' is not assignable to type 'Component<P, S, SS>'.
!!! error TS2416:                 Types of property 'props' are incompatible.
!!! error TS2416:                   Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>'. Two different types with this name exist, but they are unrelated.
!!! error TS2416:                     Type 'Readonly<{ children?: ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<P>'.
        return <div>Hello</div>;
      }
    }
    
    // OK
    const Test1a = () => <FieldFeedbackBeta when={value => !!value} error>Hah</FieldFeedbackBeta>;
    
    // Error: Void not assignable to boolean
    const Test2a = () => <FieldFeedbackBeta when={value => console.log(value)} error>Hah</FieldFeedbackBeta>;
                                            ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error.
!!! error TS2769:     Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2769:       Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769:         Type 'void' is not assignable to type 'boolean'.
!!! error TS2769:   Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
!!! error TS2769:     Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedbackBeta<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, keyof Props>> & Partial<Pick<BaseProps, never>>'
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedbackBeta<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, keyof Props>> & Partial<Pick<BaseProps, never>>'
    
    interface MyPropsProps extends Props {
      when: (value: string) => boolean;
    }
    
    class FieldFeedback2<P extends MyPropsProps = MyPropsProps> extends FieldFeedback<P> {
      static defaultProps = {
        when: () => true
      };
    
      render() {
      ~~~~~~
!!! error TS2416: Property 'render' in type 'FieldFeedback2<P>' is not assignable to the same property in base type 'FieldFeedback<P>'.
!!! error TS2416:   Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated.
!!! error TS2416:     The 'this' types of each signature are incompatible.
!!! error TS2416:       Type 'FieldFeedback<P>' is not assignable to type 'FieldFeedback2<P>'.
!!! error TS2416:         Types of property 'render' are incompatible.
!!! error TS2416:           Type '() => JSX.Element' is not assignable to type '() => JSX.Element'. Two different types with this name exist, but they are unrelated.
!!! error TS2416:             The 'this' types of each signature are incompatible.
!!! error TS2416:               Type 'FieldFeedback2<P>' is not assignable to type 'FieldFeedback<P>'.
!!! error TS2416:                 Types of property 'props' are incompatible.
!!! error TS2416:                   Type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<{ children?: import("react").ReactNode; }> & Readonly<P>'. Two different types with this name exist, but they are unrelated.
!!! error TS2416:                     Type 'Readonly<{ children?: ReactNode; }> & Readonly<P>' is not assignable to type 'Readonly<P>'.
        this.props.when("now"); // OK, always defined
        return <div>Hello</div>;
      }
    }
    
    // OK
    const Test3 = () => <FieldFeedback2 when={value => !!value} />;
    
    // Error: Void not assignable to boolean
    const Test4 = () => <FieldFeedback2 when={value => console.log(value)} />;
                                        ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the following error.
!!! error TS2769:     Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769:       Type 'void' is not assignable to type 'boolean'.
!!! error TS2769:   Overload 2 of 2, '(props: MyPropsProps, context?: any): FieldFeedback2<MyPropsProps>', gave the following error.
!!! error TS2769:     Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:46:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback2<MyPropsProps>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:46:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback2<MyPropsProps>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
    
    // OK
    const Test5 = () => <FieldFeedback2 />;
    