tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(1,19): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(2,19): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(3,12): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(4,12): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(5,19): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(8,4): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(11,19): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(12,19): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(13,12): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(14,12): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(15,19): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(18,4): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(20,37): error TS1385: Function type notation must be parenthesized when used in a union type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(21,31): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(22,16): error TS1387: Function type notation must be parenthesized when used in an intersection type.
tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts(22,37): error TS1385: Function type notation must be parenthesized when used in a union type.


==== tests/cases/compiler/unparenthesizedFunctionTypeInUnionOrIntersection.ts (16 errors) ====
    type U1 = string | () => void;
                      ~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    type U2 = string | (foo: number) => void
                      ~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    type U3 = | () => number
               ~~~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    type U4 = | (foo?: number) => void;
               ~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    type U5 = string | (number: number, foo?: string) => void | number;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    type U6 =
      | string
      | (...args: any[]) => void
       ~~~~~~~~~~~~~~~~~~~~~~~~~
      | number;
    ~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    
    type I1 = string & () => void;
                      ~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    type I2 = string & (...foo: number[]) => void;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    type I3 = & () => boolean
               ~~~~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    type I4 = & () => boolean & null;
               ~~~~~~~~~~~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    type I5 = string & (any: any, any2: any) => any & any;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    type I6 =
      & string
      & (foo: any) => void;
       ~~~~~~~~~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    
    type M1 = string | number & string | () => number;
                                        ~~~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    type M2 = any & string | any & () => void;
                                  ~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
    type M3 = any & (foo: any) => void | () => void & any;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1387: Function type notation must be parenthesized when used in an intersection type.
                                        ~~~~~~~~~~~~~~~~~
!!! error TS1385: Function type notation must be parenthesized when used in a union type.
    
    type OK1 = string | (number);
    type OK2 = string | ((number));
    type OK3 = string | (()=> void);
    type OK4 = string | (()=> string | number);
    