typeArgumentInferenceWithClassExpression1.ts(2,5): error TS2322: Type 'undefined' is not assignable to type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.


==== typeArgumentInferenceWithClassExpression1.ts (1 errors) ====
    function foo<T>(x = class { static prop: T }): T {
        return undefined;
        ~~~~~~
!!! error TS2322: Type 'undefined' is not assignable to type 'T'.
!!! error TS2322:   'T' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
    }
    
    foo(class { static prop = "hello" }).length;