mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
361 B
TypeScript
17 lines
361 B
TypeScript
//// [tests/cases/compiler/generics4.ts] ////
|
|
|
|
//// [generics4.ts]
|
|
class C<T> { private x: T; }
|
|
interface X { f(): string; }
|
|
interface Y { f(): boolean; }
|
|
declare var a: C<X>;
|
|
declare var b: C<Y>;
|
|
|
|
a = b; // Not ok - return types of "f" are different
|
|
|
|
//// [generics4.js]
|
|
"use strict";
|
|
class C {
|
|
}
|
|
a = b; // Not ok - return types of "f" are different
|