tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(21,5): error TS2322: Type 'T' is not assignable to type 'boolean'.
  Type 'TableClass<any>' is not assignable to type 'boolean'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(22,5): error TS2322: Type 'T' is not assignable to type 'string | number'.
  Type 'TableClass<any>' is not assignable to type 'string | number'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(23,5): error TS2322: Type 'T' is not assignable to type 'string | Something'.
  Type 'TableClass<any>' is not assignable to type 'string | Something'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(24,5): error TS2322: Type 'T' is not assignable to type 'Something | SomethingElse'.
  Type 'TableClass<any>' is not assignable to type 'Something | SomethingElse'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(28,5): error TS2322: Type 'T' is not assignable to type 'boolean'.
  Type 'TableClass<any>' is not assignable to type 'boolean'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(29,5): error TS2322: Type 'T' is not assignable to type 'string | number'.
  Type 'TableClass<any>' is not assignable to type 'string | number'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(30,5): error TS2322: Type 'T' is not assignable to type 'string | Something'.
  Type 'TableClass<any>' is not assignable to type 'string | Something'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(31,5): error TS2322: Type 'T' is not assignable to type 'Something | SomethingElse'.
  Type 'TableClass<any>' is not assignable to type 'Something | SomethingElse'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(35,1): error TS2322: Type 'Table' is not assignable to type 'boolean'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(36,1): error TS2322: Type 'Table' is not assignable to type 'string | number'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(37,1): error TS2322: Type 'Table' is not assignable to type 'string | Something'.
tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts(38,1): error TS2322: Type 'Table' is not assignable to type 'Something | SomethingElse'.


==== tests/cases/compiler/typeVariableConstraintedToAliasNotAssignableToUnion.ts (12 errors) ====
    declare class TableClass<S = any> {
        _field: S;
    }
    
    export type Table = TableClass;
    
    interface Something {
        prop: number;
    }
    
    interface SomethingElse {
        prop2: string;
    }
    
    declare let aBoolean: boolean;
    declare let aStringOrNumber: string | number;
    declare let aStringOrSomething: string | Something;
    declare let someUnion: Something | SomethingElse;
    
    function fn<T extends Table>(o: T) {
        aBoolean = o;
        ~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'boolean'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'boolean'.
        aStringOrNumber = o;
        ~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'string | number'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'string | number'.
        aStringOrSomething = o;
        ~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'string | Something'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'string | Something'.
        someUnion = o;
        ~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'Something | SomethingElse'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'Something | SomethingElse'.
    }
    
    function fn2<T extends TableClass>(o: T) {
        aBoolean = o;
        ~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'boolean'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'boolean'.
        aStringOrNumber = o;
        ~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'string | number'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'string | number'.
        aStringOrSomething = o;
        ~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'string | Something'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'string | Something'.
        someUnion = o;
        ~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'Something | SomethingElse'.
!!! error TS2322:   Type 'TableClass<any>' is not assignable to type 'Something | SomethingElse'.
    }
    
    declare const o: Table;
    aBoolean = o;
    ~~~~~~~~
!!! error TS2322: Type 'Table' is not assignable to type 'boolean'.
    aStringOrNumber = o;
    ~~~~~~~~~~~~~~~
!!! error TS2322: Type 'Table' is not assignable to type 'string | number'.
    aStringOrSomething = o;
    ~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'Table' is not assignable to type 'string | Something'.
    someUnion = o;
    ~~~~~~~~~
!!! error TS2322: Type 'Table' is not assignable to type 'Something | SomethingElse'.
    