primitiveConstraints2.ts(3,7): error TS2322: Type 'null' is not assignable to type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'null'.
primitiveConstraints2.ts(8,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
primitiveConstraints2.ts(9,8): error TS2344: Type 'string' does not satisfy the constraint 'number'.


==== primitiveConstraints2.ts (3 errors) ====
    class C<T> {
       public bar2<U extends T>(x: T, y: U): T {
          return null;
          ~~~~~~
!!! error TS2322: Type 'null' is not assignable to type 'T'.
!!! error TS2322:   'T' could be instantiated with an arbitrary type which could be unrelated to 'null'.
         }
    }
     
    var x = new C<number>();
    x.bar2(2, ""); // should error
              ~~
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
    x.bar2<string>(2, ""); // should error
           ~~~~~~
!!! error TS2344: Type 'string' does not satisfy the constraint 'number'.