tests/cases/compiler/primitiveConstraints2.ts(8,1): error TS2684: The 'this' context of type 'C<number>' is not assignable to method's 'this' of type 'C<T>'.
  Type 'number' is not assignable to type 'T'.
    'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
tests/cases/compiler/primitiveConstraints2.ts(9,8): error TS2344: Type 'string' does not satisfy the constraint 'number'.


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