tests/cases/compiler/genericCloneReturnTypes.ts(22,10): error TS2684: The 'this' context of type 'Bar<number>' is not assignable to method's 'this' of type 'Bar<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/genericCloneReturnTypes.ts(25,1): error TS2322: Type 'Bar<string>' is not assignable to type 'Bar<number>'.
  Type 'string' is not assignable to type 'number'.


==== tests/cases/compiler/genericCloneReturnTypes.ts (2 errors) ====
    class Bar<T> {
    
        public size: number;
        public t: T;
    
        constructor(x: number) {
    
            this.size = x;
    
        }
    
        public clone() {
    
            return new Bar<T>(this.size);
    
        }
    
    }
    
    var b: Bar<number>;
    
    var b2 = b.clone();
             ~
!!! error TS2684: The 'this' context of type 'Bar<number>' is not assignable to method's 'this' of type 'Bar<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'.
    var b3: Bar<string>;
    b = b2;
    b = b3;
    ~
!!! error TS2322: Type 'Bar<string>' is not assignable to type 'Bar<number>'.
!!! error TS2322:   Type 'string' is not assignable to type 'number'.