mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 22:51:17 -05:00
Accepting new baselines
This commit is contained in:
@@ -1,136 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts(114,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts (1 errors) ====
|
||||
// any is not a subtype of any other types, but is assignable, all the below should work
|
||||
|
||||
interface I {
|
||||
[x: string]: any;
|
||||
foo: any; // ok, any identical to itself
|
||||
}
|
||||
|
||||
|
||||
interface I2 {
|
||||
[x: string]: number;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I3 {
|
||||
[x: string]: string;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I4 {
|
||||
[x: string]: boolean;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I5 {
|
||||
[x: string]: Date;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I6 {
|
||||
[x: string]: RegExp;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I7 {
|
||||
[x: string]: { bar: number };
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I8 {
|
||||
[x: string]: number[];
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I9 {
|
||||
[x: string]: I8;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
class A { foo: number; }
|
||||
interface I10 {
|
||||
[x: string]: A;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
class A2<T> { foo: T; }
|
||||
interface I11 {
|
||||
[x: string]: A2<number>;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I12 {
|
||||
[x: string]: (x) => number;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I13 {
|
||||
[x: string]: <T>(x: T) => T;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
enum E { A }
|
||||
interface I14 {
|
||||
[x: string]: E;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
function f() { }
|
||||
module f {
|
||||
export var bar = 1;
|
||||
}
|
||||
interface I15 {
|
||||
[x: string]: typeof f;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
class c { baz: string }
|
||||
module c {
|
||||
export var bar = 1;
|
||||
}
|
||||
interface I16 {
|
||||
[x: string]: typeof c;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I17<T> {
|
||||
[x: string]: T;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I18<T, U extends T> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
[x: string]: U;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I19 {
|
||||
[x: string]: Object;
|
||||
foo: any;
|
||||
}
|
||||
|
||||
|
||||
interface I20 {
|
||||
[x: string]: {};
|
||||
foo: any;
|
||||
}
|
||||
|
||||
274
tests/baselines/reference/anyAssignableToEveryType2.symbols
Normal file
274
tests/baselines/reference/anyAssignableToEveryType2.symbols
Normal file
@@ -0,0 +1,274 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts ===
|
||||
// any is not a subtype of any other types, but is assignable, all the below should work
|
||||
|
||||
interface I {
|
||||
>I : Symbol(I, Decl(anyAssignableToEveryType2.ts, 0, 0))
|
||||
|
||||
[x: string]: any;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 3, 5))
|
||||
|
||||
foo: any; // ok, any identical to itself
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 3, 21))
|
||||
}
|
||||
|
||||
|
||||
interface I2 {
|
||||
>I2 : Symbol(I2, Decl(anyAssignableToEveryType2.ts, 5, 1))
|
||||
|
||||
[x: string]: number;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 9, 5))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 9, 24))
|
||||
}
|
||||
|
||||
|
||||
interface I3 {
|
||||
>I3 : Symbol(I3, Decl(anyAssignableToEveryType2.ts, 11, 1))
|
||||
|
||||
[x: string]: string;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 15, 5))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 15, 24))
|
||||
}
|
||||
|
||||
|
||||
interface I4 {
|
||||
>I4 : Symbol(I4, Decl(anyAssignableToEveryType2.ts, 17, 1))
|
||||
|
||||
[x: string]: boolean;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 21, 5))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 21, 25))
|
||||
}
|
||||
|
||||
|
||||
interface I5 {
|
||||
>I5 : Symbol(I5, Decl(anyAssignableToEveryType2.ts, 23, 1))
|
||||
|
||||
[x: string]: Date;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 27, 5))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 27, 22))
|
||||
}
|
||||
|
||||
|
||||
interface I6 {
|
||||
>I6 : Symbol(I6, Decl(anyAssignableToEveryType2.ts, 29, 1))
|
||||
|
||||
[x: string]: RegExp;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 33, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 33, 24))
|
||||
}
|
||||
|
||||
|
||||
interface I7 {
|
||||
>I7 : Symbol(I7, Decl(anyAssignableToEveryType2.ts, 35, 1))
|
||||
|
||||
[x: string]: { bar: number };
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 39, 5))
|
||||
>bar : Symbol(bar, Decl(anyAssignableToEveryType2.ts, 39, 18))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 39, 33))
|
||||
}
|
||||
|
||||
|
||||
interface I8 {
|
||||
>I8 : Symbol(I8, Decl(anyAssignableToEveryType2.ts, 41, 1))
|
||||
|
||||
[x: string]: number[];
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 45, 5))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 45, 26))
|
||||
}
|
||||
|
||||
|
||||
interface I9 {
|
||||
>I9 : Symbol(I9, Decl(anyAssignableToEveryType2.ts, 47, 1))
|
||||
|
||||
[x: string]: I8;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 51, 5))
|
||||
>I8 : Symbol(I8, Decl(anyAssignableToEveryType2.ts, 41, 1))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 51, 20))
|
||||
}
|
||||
|
||||
class A { foo: number; }
|
||||
>A : Symbol(A, Decl(anyAssignableToEveryType2.ts, 53, 1))
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 55, 9))
|
||||
|
||||
interface I10 {
|
||||
>I10 : Symbol(I10, Decl(anyAssignableToEveryType2.ts, 55, 24))
|
||||
|
||||
[x: string]: A;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 57, 5))
|
||||
>A : Symbol(A, Decl(anyAssignableToEveryType2.ts, 53, 1))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 57, 19))
|
||||
}
|
||||
|
||||
class A2<T> { foo: T; }
|
||||
>A2 : Symbol(A2, Decl(anyAssignableToEveryType2.ts, 59, 1))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 61, 9))
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 61, 13))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 61, 9))
|
||||
|
||||
interface I11 {
|
||||
>I11 : Symbol(I11, Decl(anyAssignableToEveryType2.ts, 61, 23))
|
||||
|
||||
[x: string]: A2<number>;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 63, 5))
|
||||
>A2 : Symbol(A2, Decl(anyAssignableToEveryType2.ts, 59, 1))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 63, 28))
|
||||
}
|
||||
|
||||
|
||||
interface I12 {
|
||||
>I12 : Symbol(I12, Decl(anyAssignableToEveryType2.ts, 65, 1))
|
||||
|
||||
[x: string]: (x) => number;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 69, 5))
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 69, 18))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 69, 31))
|
||||
}
|
||||
|
||||
|
||||
interface I13 {
|
||||
>I13 : Symbol(I13, Decl(anyAssignableToEveryType2.ts, 71, 1))
|
||||
|
||||
[x: string]: <T>(x: T) => T;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 75, 5))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 75, 18))
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 75, 21))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 75, 18))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 75, 18))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 75, 32))
|
||||
}
|
||||
|
||||
|
||||
enum E { A }
|
||||
>E : Symbol(E, Decl(anyAssignableToEveryType2.ts, 77, 1))
|
||||
>A : Symbol(E.A, Decl(anyAssignableToEveryType2.ts, 80, 8))
|
||||
|
||||
interface I14 {
|
||||
>I14 : Symbol(I14, Decl(anyAssignableToEveryType2.ts, 80, 12))
|
||||
|
||||
[x: string]: E;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 82, 5))
|
||||
>E : Symbol(E, Decl(anyAssignableToEveryType2.ts, 77, 1))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 82, 19))
|
||||
}
|
||||
|
||||
|
||||
function f() { }
|
||||
>f : Symbol(f, Decl(anyAssignableToEveryType2.ts, 84, 1), Decl(anyAssignableToEveryType2.ts, 87, 16))
|
||||
|
||||
module f {
|
||||
>f : Symbol(f, Decl(anyAssignableToEveryType2.ts, 84, 1), Decl(anyAssignableToEveryType2.ts, 87, 16))
|
||||
|
||||
export var bar = 1;
|
||||
>bar : Symbol(bar, Decl(anyAssignableToEveryType2.ts, 89, 14))
|
||||
}
|
||||
interface I15 {
|
||||
>I15 : Symbol(I15, Decl(anyAssignableToEveryType2.ts, 90, 1))
|
||||
|
||||
[x: string]: typeof f;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 92, 5))
|
||||
>f : Symbol(f, Decl(anyAssignableToEveryType2.ts, 84, 1), Decl(anyAssignableToEveryType2.ts, 87, 16))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 92, 26))
|
||||
}
|
||||
|
||||
|
||||
class c { baz: string }
|
||||
>c : Symbol(c, Decl(anyAssignableToEveryType2.ts, 94, 1), Decl(anyAssignableToEveryType2.ts, 97, 23))
|
||||
>baz : Symbol(baz, Decl(anyAssignableToEveryType2.ts, 97, 9))
|
||||
|
||||
module c {
|
||||
>c : Symbol(c, Decl(anyAssignableToEveryType2.ts, 94, 1), Decl(anyAssignableToEveryType2.ts, 97, 23))
|
||||
|
||||
export var bar = 1;
|
||||
>bar : Symbol(bar, Decl(anyAssignableToEveryType2.ts, 99, 14))
|
||||
}
|
||||
interface I16 {
|
||||
>I16 : Symbol(I16, Decl(anyAssignableToEveryType2.ts, 100, 1))
|
||||
|
||||
[x: string]: typeof c;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 102, 5))
|
||||
>c : Symbol(c, Decl(anyAssignableToEveryType2.ts, 94, 1), Decl(anyAssignableToEveryType2.ts, 97, 23))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 102, 26))
|
||||
}
|
||||
|
||||
|
||||
interface I17<T> {
|
||||
>I17 : Symbol(I17, Decl(anyAssignableToEveryType2.ts, 104, 1))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 107, 14))
|
||||
|
||||
[x: string]: T;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 108, 5))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 107, 14))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 108, 19))
|
||||
}
|
||||
|
||||
|
||||
interface I18<T, U extends T> {
|
||||
>I18 : Symbol(I18, Decl(anyAssignableToEveryType2.ts, 110, 1))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 113, 14))
|
||||
>U : Symbol(U, Decl(anyAssignableToEveryType2.ts, 113, 16))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType2.ts, 113, 14))
|
||||
|
||||
[x: string]: U;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 114, 5))
|
||||
>U : Symbol(U, Decl(anyAssignableToEveryType2.ts, 113, 16))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 114, 19))
|
||||
}
|
||||
|
||||
|
||||
interface I19 {
|
||||
>I19 : Symbol(I19, Decl(anyAssignableToEveryType2.ts, 116, 1))
|
||||
|
||||
[x: string]: Object;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 120, 5))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 120, 24))
|
||||
}
|
||||
|
||||
|
||||
interface I20 {
|
||||
>I20 : Symbol(I20, Decl(anyAssignableToEveryType2.ts, 122, 1))
|
||||
|
||||
[x: string]: {};
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 126, 5))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(foo, Decl(anyAssignableToEveryType2.ts, 126, 20))
|
||||
}
|
||||
|
||||
276
tests/baselines/reference/anyAssignableToEveryType2.types
Normal file
276
tests/baselines/reference/anyAssignableToEveryType2.types
Normal file
@@ -0,0 +1,276 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts ===
|
||||
// any is not a subtype of any other types, but is assignable, all the below should work
|
||||
|
||||
interface I {
|
||||
>I : I
|
||||
|
||||
[x: string]: any;
|
||||
>x : string
|
||||
|
||||
foo: any; // ok, any identical to itself
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I2 {
|
||||
>I2 : I2
|
||||
|
||||
[x: string]: number;
|
||||
>x : string
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I3 {
|
||||
>I3 : I3
|
||||
|
||||
[x: string]: string;
|
||||
>x : string
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I4 {
|
||||
>I4 : I4
|
||||
|
||||
[x: string]: boolean;
|
||||
>x : string
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I5 {
|
||||
>I5 : I5
|
||||
|
||||
[x: string]: Date;
|
||||
>x : string
|
||||
>Date : Date
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I6 {
|
||||
>I6 : I6
|
||||
|
||||
[x: string]: RegExp;
|
||||
>x : string
|
||||
>RegExp : RegExp
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I7 {
|
||||
>I7 : I7
|
||||
|
||||
[x: string]: { bar: number };
|
||||
>x : string
|
||||
>bar : number
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I8 {
|
||||
>I8 : I8
|
||||
|
||||
[x: string]: number[];
|
||||
>x : string
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I9 {
|
||||
>I9 : I9
|
||||
|
||||
[x: string]: I8;
|
||||
>x : string
|
||||
>I8 : I8
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
class A { foo: number; }
|
||||
>A : A
|
||||
>foo : number
|
||||
|
||||
interface I10 {
|
||||
>I10 : I10
|
||||
|
||||
[x: string]: A;
|
||||
>x : string
|
||||
>A : A
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
class A2<T> { foo: T; }
|
||||
>A2 : A2<T>
|
||||
>T : T
|
||||
>foo : T
|
||||
>T : T
|
||||
|
||||
interface I11 {
|
||||
>I11 : I11
|
||||
|
||||
[x: string]: A2<number>;
|
||||
>x : string
|
||||
>A2 : A2<T>
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I12 {
|
||||
>I12 : I12
|
||||
|
||||
[x: string]: (x) => number;
|
||||
>x : string
|
||||
>x : any
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I13 {
|
||||
>I13 : I13
|
||||
|
||||
[x: string]: <T>(x: T) => T;
|
||||
>x : string
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
enum E { A }
|
||||
>E : E
|
||||
>A : E
|
||||
|
||||
interface I14 {
|
||||
>I14 : I14
|
||||
|
||||
[x: string]: E;
|
||||
>x : string
|
||||
>E : E
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
function f() { }
|
||||
>f : typeof f
|
||||
|
||||
module f {
|
||||
>f : typeof f
|
||||
|
||||
export var bar = 1;
|
||||
>bar : number
|
||||
>1 : number
|
||||
}
|
||||
interface I15 {
|
||||
>I15 : I15
|
||||
|
||||
[x: string]: typeof f;
|
||||
>x : string
|
||||
>f : typeof f
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
class c { baz: string }
|
||||
>c : c
|
||||
>baz : string
|
||||
|
||||
module c {
|
||||
>c : typeof c
|
||||
|
||||
export var bar = 1;
|
||||
>bar : number
|
||||
>1 : number
|
||||
}
|
||||
interface I16 {
|
||||
>I16 : I16
|
||||
|
||||
[x: string]: typeof c;
|
||||
>x : string
|
||||
>c : typeof c
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I17<T> {
|
||||
>I17 : I17<T>
|
||||
>T : T
|
||||
|
||||
[x: string]: T;
|
||||
>x : string
|
||||
>T : T
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I18<T, U extends T> {
|
||||
>I18 : I18<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
|
||||
[x: string]: U;
|
||||
>x : string
|
||||
>U : U
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I19 {
|
||||
>I19 : I19
|
||||
|
||||
[x: string]: Object;
|
||||
>x : string
|
||||
>Object : Object
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
|
||||
interface I20 {
|
||||
>I20 : I20
|
||||
|
||||
[x: string]: {};
|
||||
>x : string
|
||||
|
||||
foo: any;
|
||||
>foo : any
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/compiler/assertInWrapSomeTypeParameter.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/assertInWrapSomeTypeParameter.ts(2,26): error TS1005: '>' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assertInWrapSomeTypeParameter.ts (2 errors) ====
|
||||
==== tests/cases/compiler/assertInWrapSomeTypeParameter.ts (1 errors) ====
|
||||
class C<T extends C<T>> {
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo<U extends C<C<T>>(x: U) {
|
||||
~
|
||||
!!! error TS1005: '>' expected.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts(7,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts(8,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts (2 errors) ====
|
||||
// some complex cases of assignment compat of generic signatures.
|
||||
|
||||
interface I2<T> {
|
||||
p: T
|
||||
}
|
||||
|
||||
var x: <T extends I2<T>>(z: T) => void
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var y: <T extends I2<I2<T>>>(z: T) => void
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
// These both do not make sense as we would eventually be comparing I2<T> to I2<I2<T>>, and they are self referencing anyway
|
||||
x = y
|
||||
y = x
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts ===
|
||||
// some complex cases of assignment compat of generic signatures.
|
||||
|
||||
interface I2<T> {
|
||||
>I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 2, 13))
|
||||
|
||||
p: T
|
||||
>p : Symbol(p, Decl(assignmentCompatWithGenericCallSignatures4.ts, 2, 17))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 2, 13))
|
||||
}
|
||||
|
||||
var x: <T extends I2<T>>(z: T) => void
|
||||
>x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 3))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 8))
|
||||
>I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 8))
|
||||
>z : Symbol(z, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 25))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 8))
|
||||
|
||||
var y: <T extends I2<I2<T>>>(z: T) => void
|
||||
>y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 3))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 8))
|
||||
>I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0))
|
||||
>I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 8))
|
||||
>z : Symbol(z, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 29))
|
||||
>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 8))
|
||||
|
||||
// These both do not make sense as we would eventually be comparing I2<T> to I2<I2<T>>, and they are self referencing anyway
|
||||
x = y
|
||||
>x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 3))
|
||||
>y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 3))
|
||||
|
||||
y = x
|
||||
>y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 3))
|
||||
>x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 3))
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts ===
|
||||
// some complex cases of assignment compat of generic signatures.
|
||||
|
||||
interface I2<T> {
|
||||
>I2 : I2<T>
|
||||
>T : T
|
||||
|
||||
p: T
|
||||
>p : T
|
||||
>T : T
|
||||
}
|
||||
|
||||
var x: <T extends I2<T>>(z: T) => void
|
||||
>x : <T extends I2<T>>(z: T) => void
|
||||
>T : T
|
||||
>I2 : I2<T>
|
||||
>T : T
|
||||
>z : T
|
||||
>T : T
|
||||
|
||||
var y: <T extends I2<I2<T>>>(z: T) => void
|
||||
>y : <T extends I2<I2<T>>>(z: T) => void
|
||||
>T : T
|
||||
>I2 : I2<T>
|
||||
>I2 : I2<T>
|
||||
>T : T
|
||||
>z : T
|
||||
>T : T
|
||||
|
||||
// These both do not make sense as we would eventually be comparing I2<T> to I2<I2<T>>, and they are self referencing anyway
|
||||
x = y
|
||||
>x = y : <T extends I2<I2<T>>>(z: T) => void
|
||||
>x : <T extends I2<T>>(z: T) => void
|
||||
>y : <T extends I2<I2<T>>>(z: T) => void
|
||||
|
||||
y = x
|
||||
>y = x : <T extends I2<T>>(z: T) => void
|
||||
>y : <T extends I2<I2<T>>>(z: T) => void
|
||||
>x : <T extends I2<T>>(z: T) => void
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
tests/cases/compiler/assignmentStricterConstraints.ts(1,22): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/assignmentStricterConstraints.ts(2,5): error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentStricterConstraints.ts (2 errors) ====
|
||||
var f = function <T, S extends T>(x: T, y: S): void {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
x = y
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
}
|
||||
|
||||
var g = function <T, S>(x: T, y: S): void { }
|
||||
|
||||
g = f
|
||||
g(1, "")
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
=== tests/cases/compiler/assignmentStricterConstraints.ts ===
|
||||
var f = function <T, S extends T>(x: T, y: S): void {
|
||||
>f : Symbol(f, Decl(assignmentStricterConstraints.ts, 0, 3))
|
||||
>T : Symbol(T, Decl(assignmentStricterConstraints.ts, 0, 18))
|
||||
>S : Symbol(S, Decl(assignmentStricterConstraints.ts, 0, 20))
|
||||
>T : Symbol(T, Decl(assignmentStricterConstraints.ts, 0, 18))
|
||||
>x : Symbol(x, Decl(assignmentStricterConstraints.ts, 0, 34))
|
||||
>T : Symbol(T, Decl(assignmentStricterConstraints.ts, 0, 18))
|
||||
>y : Symbol(y, Decl(assignmentStricterConstraints.ts, 0, 39))
|
||||
>S : Symbol(S, Decl(assignmentStricterConstraints.ts, 0, 20))
|
||||
|
||||
x = y
|
||||
>x : Symbol(x, Decl(assignmentStricterConstraints.ts, 0, 34))
|
||||
>y : Symbol(y, Decl(assignmentStricterConstraints.ts, 0, 39))
|
||||
}
|
||||
|
||||
var g = function <T, S>(x: T, y: S): void { }
|
||||
>g : Symbol(g, Decl(assignmentStricterConstraints.ts, 4, 3))
|
||||
>T : Symbol(T, Decl(assignmentStricterConstraints.ts, 4, 18))
|
||||
>S : Symbol(S, Decl(assignmentStricterConstraints.ts, 4, 20))
|
||||
>x : Symbol(x, Decl(assignmentStricterConstraints.ts, 4, 24))
|
||||
>T : Symbol(T, Decl(assignmentStricterConstraints.ts, 4, 18))
|
||||
>y : Symbol(y, Decl(assignmentStricterConstraints.ts, 4, 29))
|
||||
>S : Symbol(S, Decl(assignmentStricterConstraints.ts, 4, 20))
|
||||
|
||||
g = f
|
||||
>g : Symbol(g, Decl(assignmentStricterConstraints.ts, 4, 3))
|
||||
>f : Symbol(f, Decl(assignmentStricterConstraints.ts, 0, 3))
|
||||
|
||||
g(1, "")
|
||||
>g : Symbol(g, Decl(assignmentStricterConstraints.ts, 4, 3))
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
=== tests/cases/compiler/assignmentStricterConstraints.ts ===
|
||||
var f = function <T, S extends T>(x: T, y: S): void {
|
||||
>f : <T, S extends T>(x: T, y: S) => void
|
||||
>function <T, S extends T>(x: T, y: S): void { x = y} : <T, S extends T>(x: T, y: S) => void
|
||||
>T : T
|
||||
>S : S
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>y : S
|
||||
>S : S
|
||||
|
||||
x = y
|
||||
>x = y : S
|
||||
>x : T
|
||||
>y : S
|
||||
}
|
||||
|
||||
var g = function <T, S>(x: T, y: S): void { }
|
||||
>g : <T, S>(x: T, y: S) => void
|
||||
>function <T, S>(x: T, y: S): void { } : <T, S>(x: T, y: S) => void
|
||||
>T : T
|
||||
>S : S
|
||||
>x : T
|
||||
>T : T
|
||||
>y : S
|
||||
>S : S
|
||||
|
||||
g = f
|
||||
>g = f : <T, S extends T>(x: T, y: S) => void
|
||||
>g : <T, S>(x: T, y: S) => void
|
||||
>f : <T, S extends T>(x: T, y: S) => void
|
||||
|
||||
g(1, "")
|
||||
>g(1, "") : void
|
||||
>g : <T, S>(x: T, y: S) => void
|
||||
>1 : number
|
||||
>"" : string
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(18,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(22,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts(22,28): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts (3 errors) ====
|
||||
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
|
||||
// these are errors
|
||||
|
||||
class Base { foo: string; }
|
||||
class Derived extends Base { bar: string; }
|
||||
class Derived2 extends Base { baz: string; }
|
||||
var base: Base;
|
||||
var derived: Derived;
|
||||
var derived2: Derived2;
|
||||
|
||||
var r2 = true ? 1 : '';
|
||||
var r9 = true ? derived : derived2;
|
||||
|
||||
function foo<T, U>(t: T, u: U) {
|
||||
return true ? t : u;
|
||||
}
|
||||
|
||||
function foo2<T extends U, U>(t: T, u: U) { // Error for referencing own type parameter
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return true ? t : u; // Ok because BCT(T, U) = U
|
||||
}
|
||||
|
||||
function foo3<T extends U, U extends V, V>(t: T, u: U) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return true ? t : u;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts ===
|
||||
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
|
||||
// these are errors
|
||||
|
||||
class Base { foo: string; }
|
||||
>Base : Symbol(Base, Decl(bestCommonTypeOfConditionalExpressions2.ts, 0, 0))
|
||||
>foo : Symbol(foo, Decl(bestCommonTypeOfConditionalExpressions2.ts, 3, 12))
|
||||
|
||||
class Derived extends Base { bar: string; }
|
||||
>Derived : Symbol(Derived, Decl(bestCommonTypeOfConditionalExpressions2.ts, 3, 27))
|
||||
>Base : Symbol(Base, Decl(bestCommonTypeOfConditionalExpressions2.ts, 0, 0))
|
||||
>bar : Symbol(bar, Decl(bestCommonTypeOfConditionalExpressions2.ts, 4, 28))
|
||||
|
||||
class Derived2 extends Base { baz: string; }
|
||||
>Derived2 : Symbol(Derived2, Decl(bestCommonTypeOfConditionalExpressions2.ts, 4, 43))
|
||||
>Base : Symbol(Base, Decl(bestCommonTypeOfConditionalExpressions2.ts, 0, 0))
|
||||
>baz : Symbol(baz, Decl(bestCommonTypeOfConditionalExpressions2.ts, 5, 29))
|
||||
|
||||
var base: Base;
|
||||
>base : Symbol(base, Decl(bestCommonTypeOfConditionalExpressions2.ts, 6, 3))
|
||||
>Base : Symbol(Base, Decl(bestCommonTypeOfConditionalExpressions2.ts, 0, 0))
|
||||
|
||||
var derived: Derived;
|
||||
>derived : Symbol(derived, Decl(bestCommonTypeOfConditionalExpressions2.ts, 7, 3))
|
||||
>Derived : Symbol(Derived, Decl(bestCommonTypeOfConditionalExpressions2.ts, 3, 27))
|
||||
|
||||
var derived2: Derived2;
|
||||
>derived2 : Symbol(derived2, Decl(bestCommonTypeOfConditionalExpressions2.ts, 8, 3))
|
||||
>Derived2 : Symbol(Derived2, Decl(bestCommonTypeOfConditionalExpressions2.ts, 4, 43))
|
||||
|
||||
var r2 = true ? 1 : '';
|
||||
>r2 : Symbol(r2, Decl(bestCommonTypeOfConditionalExpressions2.ts, 10, 3))
|
||||
|
||||
var r9 = true ? derived : derived2;
|
||||
>r9 : Symbol(r9, Decl(bestCommonTypeOfConditionalExpressions2.ts, 11, 3))
|
||||
>derived : Symbol(derived, Decl(bestCommonTypeOfConditionalExpressions2.ts, 7, 3))
|
||||
>derived2 : Symbol(derived2, Decl(bestCommonTypeOfConditionalExpressions2.ts, 8, 3))
|
||||
|
||||
function foo<T, U>(t: T, u: U) {
|
||||
>foo : Symbol(foo, Decl(bestCommonTypeOfConditionalExpressions2.ts, 11, 35))
|
||||
>T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 13))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 15))
|
||||
>t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 19))
|
||||
>T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 13))
|
||||
>u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 24))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 15))
|
||||
|
||||
return true ? t : u;
|
||||
>t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 19))
|
||||
>u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions2.ts, 13, 24))
|
||||
}
|
||||
|
||||
function foo2<T extends U, U>(t: T, u: U) { // Error for referencing own type parameter
|
||||
>foo2 : Symbol(foo2, Decl(bestCommonTypeOfConditionalExpressions2.ts, 15, 1))
|
||||
>T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 14))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 26))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 26))
|
||||
>t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 30))
|
||||
>T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 14))
|
||||
>u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 35))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 26))
|
||||
|
||||
return true ? t : u; // Ok because BCT(T, U) = U
|
||||
>t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 30))
|
||||
>u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions2.ts, 17, 35))
|
||||
}
|
||||
|
||||
function foo3<T extends U, U extends V, V>(t: T, u: U) {
|
||||
>foo3 : Symbol(foo3, Decl(bestCommonTypeOfConditionalExpressions2.ts, 19, 1))
|
||||
>T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 14))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 26))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 26))
|
||||
>V : Symbol(V, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 39))
|
||||
>V : Symbol(V, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 39))
|
||||
>t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 43))
|
||||
>T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 14))
|
||||
>u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 48))
|
||||
>U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 26))
|
||||
|
||||
return true ? t : u;
|
||||
>t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 43))
|
||||
>u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions2.ts, 21, 48))
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts ===
|
||||
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
|
||||
// these are errors
|
||||
|
||||
class Base { foo: string; }
|
||||
>Base : Base
|
||||
>foo : string
|
||||
|
||||
class Derived extends Base { bar: string; }
|
||||
>Derived : Derived
|
||||
>Base : Base
|
||||
>bar : string
|
||||
|
||||
class Derived2 extends Base { baz: string; }
|
||||
>Derived2 : Derived2
|
||||
>Base : Base
|
||||
>baz : string
|
||||
|
||||
var base: Base;
|
||||
>base : Base
|
||||
>Base : Base
|
||||
|
||||
var derived: Derived;
|
||||
>derived : Derived
|
||||
>Derived : Derived
|
||||
|
||||
var derived2: Derived2;
|
||||
>derived2 : Derived2
|
||||
>Derived2 : Derived2
|
||||
|
||||
var r2 = true ? 1 : '';
|
||||
>r2 : number | string
|
||||
>true ? 1 : '' : number | string
|
||||
>true : boolean
|
||||
>1 : number
|
||||
>'' : string
|
||||
|
||||
var r9 = true ? derived : derived2;
|
||||
>r9 : Derived | Derived2
|
||||
>true ? derived : derived2 : Derived | Derived2
|
||||
>true : boolean
|
||||
>derived : Derived
|
||||
>derived2 : Derived2
|
||||
|
||||
function foo<T, U>(t: T, u: U) {
|
||||
>foo : <T, U>(t: T, u: U) => T | U
|
||||
>T : T
|
||||
>U : U
|
||||
>t : T
|
||||
>T : T
|
||||
>u : U
|
||||
>U : U
|
||||
|
||||
return true ? t : u;
|
||||
>true ? t : u : T | U
|
||||
>true : boolean
|
||||
>t : T
|
||||
>u : U
|
||||
}
|
||||
|
||||
function foo2<T extends U, U>(t: T, u: U) { // Error for referencing own type parameter
|
||||
>foo2 : <T extends U, U>(t: T, u: U) => U
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>t : T
|
||||
>T : T
|
||||
>u : U
|
||||
>U : U
|
||||
|
||||
return true ? t : u; // Ok because BCT(T, U) = U
|
||||
>true ? t : u : U
|
||||
>true : boolean
|
||||
>t : T
|
||||
>u : U
|
||||
}
|
||||
|
||||
function foo3<T extends U, U extends V, V>(t: T, u: U) {
|
||||
>foo3 : <T extends U, U extends V, V>(t: T, u: U) => U
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>V : V
|
||||
>V : V
|
||||
>t : T
|
||||
>T : T
|
||||
>u : U
|
||||
>U : U
|
||||
|
||||
return true ? t : u;
|
||||
>true ? t : u : U
|
||||
>true : boolean
|
||||
>t : T
|
||||
>u : U
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts(28,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts (1 errors) ====
|
||||
class Base {
|
||||
public a: string;
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
public b: string;
|
||||
}
|
||||
|
||||
class C {
|
||||
public c: string;
|
||||
}
|
||||
|
||||
var a1: { fn<T>(x: T): T };
|
||||
var b1: { fn(): string };
|
||||
|
||||
var a2: { fn<T>(x: T): T };
|
||||
var b2: { fn(x: string): number };
|
||||
|
||||
var a3: { fn<T>(x?: T): T };
|
||||
var b3: { fn(x?: string): number };
|
||||
|
||||
var a4: { fn<T>(...x: T[]): T };
|
||||
var b4: { fn(...x: string[]): number };
|
||||
|
||||
var a5: { fn<T>(x: T, y: T): T };
|
||||
var b5: { fn(x: string, y: number): string };
|
||||
|
||||
var a6: { fn<T, U extends T>(x: T, y: U): T };
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b6: { fn(x: Base, y: C): Base };
|
||||
|
||||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
var r1a2 = a2 < b2;
|
||||
var r1a3 = a3 < b3;
|
||||
var r1a4 = a4 < b4;
|
||||
var r1a5 = a5 < b5;
|
||||
var r1a6 = a6 < b6;
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
var r1b2 = b2 < a2;
|
||||
var r1b3 = b3 < a3;
|
||||
var r1b4 = b4 < a4;
|
||||
var r1b5 = b5 < a5;
|
||||
var r1b6 = b6 < a6;
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
var r2a2 = a2 > b2;
|
||||
var r2a3 = a3 > b3;
|
||||
var r2a4 = a4 > b4;
|
||||
var r2a5 = a5 > b5;
|
||||
var r2a6 = a6 > b6;
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
var r2b2 = b2 > a2;
|
||||
var r2b3 = b3 > a3;
|
||||
var r2b4 = b4 > a4;
|
||||
var r2b5 = b5 > a5;
|
||||
var r2b6 = b6 > a6;
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
var r3a2 = a2 <= b2;
|
||||
var r3a3 = a3 <= b3;
|
||||
var r3a4 = a4 <= b4;
|
||||
var r3a5 = a5 <= b5;
|
||||
var r3a6 = a6 <= b6;
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
var r3b2 = b2 <= a2;
|
||||
var r3b3 = b3 <= a3;
|
||||
var r3b4 = b4 <= a4;
|
||||
var r3b5 = b5 <= a5;
|
||||
var r3b6 = b6 <= a6;
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
var r4a2 = a2 >= b2;
|
||||
var r4a3 = a3 >= b3;
|
||||
var r4a4 = a4 >= b4;
|
||||
var r4a5 = a5 >= b5;
|
||||
var r4a6 = a6 >= b6;
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
var r4b2 = b2 >= a2;
|
||||
var r4b3 = b3 >= a3;
|
||||
var r4b4 = b4 >= a4;
|
||||
var r4b5 = b5 >= a5;
|
||||
var r4b6 = b6 >= a6;
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
var r5a2 = a2 == b2;
|
||||
var r5a3 = a3 == b3;
|
||||
var r5a4 = a4 == b4;
|
||||
var r5a5 = a5 == b5;
|
||||
var r5a6 = a6 == b6;
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
var r5b2 = b2 == a2;
|
||||
var r5b3 = b3 == a3;
|
||||
var r5b4 = b4 == a4;
|
||||
var r5b5 = b5 == a5;
|
||||
var r5b6 = b6 == a6;
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
var r6a2 = a2 != b2;
|
||||
var r6a3 = a3 != b3;
|
||||
var r6a4 = a4 != b4;
|
||||
var r6a5 = a5 != b5;
|
||||
var r6a6 = a6 != b6;
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
var r6b2 = b2 != a2;
|
||||
var r6b3 = b3 != a3;
|
||||
var r6b4 = b4 != a4;
|
||||
var r6b5 = b5 != a5;
|
||||
var r6b6 = b6 != a6;
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
var r7a2 = a2 === b2;
|
||||
var r7a3 = a3 === b3;
|
||||
var r7a4 = a4 === b4;
|
||||
var r7a5 = a5 === b5;
|
||||
var r7a6 = a6 === b6;
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
var r7b2 = b2 === a2;
|
||||
var r7b3 = b3 === a3;
|
||||
var r7b4 = b4 === a4;
|
||||
var r7b5 = b5 === a5;
|
||||
var r7b6 = b6 === a6;
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
var r8a2 = a2 !== b2;
|
||||
var r8a3 = a3 !== b3;
|
||||
var r8a4 = a4 !== b4;
|
||||
var r8a5 = a5 !== b5;
|
||||
var r8a6 = a6 !== b6;
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
var r8b2 = b2 !== a2;
|
||||
var r8b3 = b3 !== a3;
|
||||
var r8b4 = b4 !== a4;
|
||||
var r8b5 = b5 !== a5;
|
||||
var r8b6 = b6 !== a6;
|
||||
@@ -0,0 +1,599 @@
|
||||
=== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts ===
|
||||
class Base {
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 0, 0))
|
||||
|
||||
public a: string;
|
||||
>a : Symbol(a, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 0, 12))
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
>Derived : Symbol(Derived, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 2, 1))
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 0, 0))
|
||||
|
||||
public b: string;
|
||||
>b : Symbol(b, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 4, 28))
|
||||
}
|
||||
|
||||
class C {
|
||||
>C : Symbol(C, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 6, 1))
|
||||
|
||||
public c: string;
|
||||
>c : Symbol(c, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 8, 9))
|
||||
}
|
||||
|
||||
var a1: { fn<T>(x: T): T };
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 9))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 13))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 16))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 13))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 13))
|
||||
|
||||
var b1: { fn(): string };
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 9))
|
||||
|
||||
var a2: { fn<T>(x: T): T };
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 9))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 13))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 16))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 13))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 13))
|
||||
|
||||
var b2: { fn(x: string): number };
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 9))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 13))
|
||||
|
||||
var a3: { fn<T>(x?: T): T };
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 9))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 13))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 16))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 13))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 13))
|
||||
|
||||
var b3: { fn(x?: string): number };
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 9))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 13))
|
||||
|
||||
var a4: { fn<T>(...x: T[]): T };
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 9))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 13))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 16))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 13))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 13))
|
||||
|
||||
var b4: { fn(...x: string[]): number };
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 9))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 13))
|
||||
|
||||
var a5: { fn<T>(x: T, y: T): T };
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 9))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 13))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 16))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 13))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 21))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 13))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 13))
|
||||
|
||||
var b5: { fn(x: string, y: number): string };
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 9))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 13))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 23))
|
||||
|
||||
var a6: { fn<T, U extends T>(x: T, y: U): T };
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 9))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 13))
|
||||
>U : Symbol(U, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 13))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 29))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 13))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 34))
|
||||
>U : Symbol(U, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 13))
|
||||
|
||||
var b6: { fn(x: Base, y: C): Base };
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>fn : Symbol(fn, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 9))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 13))
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 0, 0))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 21))
|
||||
>C : Symbol(C, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 6, 1))
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 0, 0))
|
||||
|
||||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
>r1a1 : Symbol(r1a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 31, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r1a2 = a2 < b2;
|
||||
>r1a2 : Symbol(r1a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 32, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r1a3 = a3 < b3;
|
||||
>r1a3 : Symbol(r1a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 33, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r1a4 = a4 < b4;
|
||||
>r1a4 : Symbol(r1a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 34, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r1a5 = a5 < b5;
|
||||
>r1a5 : Symbol(r1a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 35, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r1a6 = a6 < b6;
|
||||
>r1a6 : Symbol(r1a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 36, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
>r1b1 : Symbol(r1b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 38, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r1b2 = b2 < a2;
|
||||
>r1b2 : Symbol(r1b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 39, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r1b3 = b3 < a3;
|
||||
>r1b3 : Symbol(r1b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 40, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r1b4 = b4 < a4;
|
||||
>r1b4 : Symbol(r1b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 41, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r1b5 = b5 < a5;
|
||||
>r1b5 : Symbol(r1b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 42, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r1b6 = b6 < a6;
|
||||
>r1b6 : Symbol(r1b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 43, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
>r2a1 : Symbol(r2a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 46, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r2a2 = a2 > b2;
|
||||
>r2a2 : Symbol(r2a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 47, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r2a3 = a3 > b3;
|
||||
>r2a3 : Symbol(r2a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 48, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r2a4 = a4 > b4;
|
||||
>r2a4 : Symbol(r2a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 49, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r2a5 = a5 > b5;
|
||||
>r2a5 : Symbol(r2a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 50, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r2a6 = a6 > b6;
|
||||
>r2a6 : Symbol(r2a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 51, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
>r2b1 : Symbol(r2b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 53, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r2b2 = b2 > a2;
|
||||
>r2b2 : Symbol(r2b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 54, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r2b3 = b3 > a3;
|
||||
>r2b3 : Symbol(r2b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 55, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r2b4 = b4 > a4;
|
||||
>r2b4 : Symbol(r2b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 56, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r2b5 = b5 > a5;
|
||||
>r2b5 : Symbol(r2b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 57, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r2b6 = b6 > a6;
|
||||
>r2b6 : Symbol(r2b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 58, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
>r3a1 : Symbol(r3a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 61, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r3a2 = a2 <= b2;
|
||||
>r3a2 : Symbol(r3a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 62, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r3a3 = a3 <= b3;
|
||||
>r3a3 : Symbol(r3a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 63, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r3a4 = a4 <= b4;
|
||||
>r3a4 : Symbol(r3a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 64, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r3a5 = a5 <= b5;
|
||||
>r3a5 : Symbol(r3a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 65, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r3a6 = a6 <= b6;
|
||||
>r3a6 : Symbol(r3a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 66, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
>r3b1 : Symbol(r3b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 68, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r3b2 = b2 <= a2;
|
||||
>r3b2 : Symbol(r3b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 69, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r3b3 = b3 <= a3;
|
||||
>r3b3 : Symbol(r3b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 70, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r3b4 = b4 <= a4;
|
||||
>r3b4 : Symbol(r3b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 71, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r3b5 = b5 <= a5;
|
||||
>r3b5 : Symbol(r3b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 72, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r3b6 = b6 <= a6;
|
||||
>r3b6 : Symbol(r3b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 73, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
>r4a1 : Symbol(r4a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 76, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r4a2 = a2 >= b2;
|
||||
>r4a2 : Symbol(r4a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 77, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r4a3 = a3 >= b3;
|
||||
>r4a3 : Symbol(r4a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 78, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r4a4 = a4 >= b4;
|
||||
>r4a4 : Symbol(r4a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 79, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r4a5 = a5 >= b5;
|
||||
>r4a5 : Symbol(r4a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 80, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r4a6 = a6 >= b6;
|
||||
>r4a6 : Symbol(r4a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 81, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
>r4b1 : Symbol(r4b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 83, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r4b2 = b2 >= a2;
|
||||
>r4b2 : Symbol(r4b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 84, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r4b3 = b3 >= a3;
|
||||
>r4b3 : Symbol(r4b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 85, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r4b4 = b4 >= a4;
|
||||
>r4b4 : Symbol(r4b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 86, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r4b5 = b5 >= a5;
|
||||
>r4b5 : Symbol(r4b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 87, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r4b6 = b6 >= a6;
|
||||
>r4b6 : Symbol(r4b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 88, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
>r5a1 : Symbol(r5a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 91, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r5a2 = a2 == b2;
|
||||
>r5a2 : Symbol(r5a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 92, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r5a3 = a3 == b3;
|
||||
>r5a3 : Symbol(r5a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 93, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r5a4 = a4 == b4;
|
||||
>r5a4 : Symbol(r5a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 94, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r5a5 = a5 == b5;
|
||||
>r5a5 : Symbol(r5a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 95, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r5a6 = a6 == b6;
|
||||
>r5a6 : Symbol(r5a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 96, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
>r5b1 : Symbol(r5b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 98, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r5b2 = b2 == a2;
|
||||
>r5b2 : Symbol(r5b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 99, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r5b3 = b3 == a3;
|
||||
>r5b3 : Symbol(r5b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 100, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r5b4 = b4 == a4;
|
||||
>r5b4 : Symbol(r5b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 101, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r5b5 = b5 == a5;
|
||||
>r5b5 : Symbol(r5b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 102, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r5b6 = b6 == a6;
|
||||
>r5b6 : Symbol(r5b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 103, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
>r6a1 : Symbol(r6a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 106, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r6a2 = a2 != b2;
|
||||
>r6a2 : Symbol(r6a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 107, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r6a3 = a3 != b3;
|
||||
>r6a3 : Symbol(r6a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 108, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r6a4 = a4 != b4;
|
||||
>r6a4 : Symbol(r6a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 109, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r6a5 = a5 != b5;
|
||||
>r6a5 : Symbol(r6a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 110, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r6a6 = a6 != b6;
|
||||
>r6a6 : Symbol(r6a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 111, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
>r6b1 : Symbol(r6b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 113, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r6b2 = b2 != a2;
|
||||
>r6b2 : Symbol(r6b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 114, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r6b3 = b3 != a3;
|
||||
>r6b3 : Symbol(r6b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 115, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r6b4 = b4 != a4;
|
||||
>r6b4 : Symbol(r6b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 116, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r6b5 = b5 != a5;
|
||||
>r6b5 : Symbol(r6b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 117, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r6b6 = b6 != a6;
|
||||
>r6b6 : Symbol(r6b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 118, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
>r7a1 : Symbol(r7a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 121, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r7a2 = a2 === b2;
|
||||
>r7a2 : Symbol(r7a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 122, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r7a3 = a3 === b3;
|
||||
>r7a3 : Symbol(r7a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 123, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r7a4 = a4 === b4;
|
||||
>r7a4 : Symbol(r7a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 124, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r7a5 = a5 === b5;
|
||||
>r7a5 : Symbol(r7a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 125, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r7a6 = a6 === b6;
|
||||
>r7a6 : Symbol(r7a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 126, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
>r7b1 : Symbol(r7b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 128, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r7b2 = b2 === a2;
|
||||
>r7b2 : Symbol(r7b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 129, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r7b3 = b3 === a3;
|
||||
>r7b3 : Symbol(r7b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 130, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r7b4 = b4 === a4;
|
||||
>r7b4 : Symbol(r7b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 131, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r7b5 = b5 === a5;
|
||||
>r7b5 : Symbol(r7b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 132, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r7b6 = b6 === a6;
|
||||
>r7b6 : Symbol(r7b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 133, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
>r8a1 : Symbol(r8a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 136, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
|
||||
var r8a2 = a2 !== b2;
|
||||
>r8a2 : Symbol(r8a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 137, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
|
||||
var r8a3 = a3 !== b3;
|
||||
>r8a3 : Symbol(r8a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 138, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
|
||||
var r8a4 = a4 !== b4;
|
||||
>r8a4 : Symbol(r8a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 139, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
|
||||
var r8a5 = a5 !== b5;
|
||||
>r8a5 : Symbol(r8a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 140, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
|
||||
var r8a6 = a6 !== b6;
|
||||
>r8a6 : Symbol(r8a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 141, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
>r8b1 : Symbol(r8b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 143, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 12, 3))
|
||||
|
||||
var r8b2 = b2 !== a2;
|
||||
>r8b2 : Symbol(r8b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 144, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 15, 3))
|
||||
|
||||
var r8b3 = b3 !== a3;
|
||||
>r8b3 : Symbol(r8b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 145, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 18, 3))
|
||||
|
||||
var r8b4 = b4 !== a4;
|
||||
>r8b4 : Symbol(r8b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 146, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 21, 3))
|
||||
|
||||
var r8b5 = b5 !== a5;
|
||||
>r8b5 : Symbol(r8b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 147, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 24, 3))
|
||||
|
||||
var r8b6 = b6 !== a6;
|
||||
>r8b6 : Symbol(r8b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 148, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts, 27, 3))
|
||||
|
||||
@@ -0,0 +1,695 @@
|
||||
=== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts ===
|
||||
class Base {
|
||||
>Base : Base
|
||||
|
||||
public a: string;
|
||||
>a : string
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
>Derived : Derived
|
||||
>Base : Base
|
||||
|
||||
public b: string;
|
||||
>b : string
|
||||
}
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
public c: string;
|
||||
>c : string
|
||||
}
|
||||
|
||||
var a1: { fn<T>(x: T): T };
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>fn : <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b1: { fn(): string };
|
||||
>b1 : { fn(): string; }
|
||||
>fn : () => string
|
||||
|
||||
var a2: { fn<T>(x: T): T };
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>fn : <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b2: { fn(x: string): number };
|
||||
>b2 : { fn(x: string): number; }
|
||||
>fn : (x: string) => number
|
||||
>x : string
|
||||
|
||||
var a3: { fn<T>(x?: T): T };
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>fn : <T>(x?: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b3: { fn(x?: string): number };
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>fn : (x?: string) => number
|
||||
>x : string
|
||||
|
||||
var a4: { fn<T>(...x: T[]): T };
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>fn : <T>(...x: T[]) => T
|
||||
>T : T
|
||||
>x : T[]
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b4: { fn(...x: string[]): number };
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>fn : (...x: string[]) => number
|
||||
>x : string[]
|
||||
|
||||
var a5: { fn<T>(x: T, y: T): T };
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>fn : <T>(x: T, y: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>y : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b5: { fn(x: string, y: number): string };
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>fn : (x: string, y: number) => string
|
||||
>x : string
|
||||
>y : number
|
||||
|
||||
var a6: { fn<T, U extends T>(x: T, y: U): T };
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>fn : <T, U extends T>(x: T, y: U) => T
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>T : T
|
||||
|
||||
var b6: { fn(x: Base, y: C): Base };
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>fn : (x: Base, y: C) => Base
|
||||
>x : Base
|
||||
>Base : Base
|
||||
>y : C
|
||||
>C : C
|
||||
>Base : Base
|
||||
|
||||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
>r1a1 : boolean
|
||||
>a1 < b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r1a2 = a2 < b2;
|
||||
>r1a2 : boolean
|
||||
>a2 < b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r1a3 = a3 < b3;
|
||||
>r1a3 : boolean
|
||||
>a3 < b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r1a4 = a4 < b4;
|
||||
>r1a4 : boolean
|
||||
>a4 < b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r1a5 = a5 < b5;
|
||||
>r1a5 : boolean
|
||||
>a5 < b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r1a6 = a6 < b6;
|
||||
>r1a6 : boolean
|
||||
>a6 < b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
>r1b1 : boolean
|
||||
>b1 < a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r1b2 = b2 < a2;
|
||||
>r1b2 : boolean
|
||||
>b2 < a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r1b3 = b3 < a3;
|
||||
>r1b3 : boolean
|
||||
>b3 < a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r1b4 = b4 < a4;
|
||||
>r1b4 : boolean
|
||||
>b4 < a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r1b5 = b5 < a5;
|
||||
>r1b5 : boolean
|
||||
>b5 < a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r1b6 = b6 < a6;
|
||||
>r1b6 : boolean
|
||||
>b6 < a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
>r2a1 : boolean
|
||||
>a1 > b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r2a2 = a2 > b2;
|
||||
>r2a2 : boolean
|
||||
>a2 > b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r2a3 = a3 > b3;
|
||||
>r2a3 : boolean
|
||||
>a3 > b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r2a4 = a4 > b4;
|
||||
>r2a4 : boolean
|
||||
>a4 > b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r2a5 = a5 > b5;
|
||||
>r2a5 : boolean
|
||||
>a5 > b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r2a6 = a6 > b6;
|
||||
>r2a6 : boolean
|
||||
>a6 > b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
>r2b1 : boolean
|
||||
>b1 > a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r2b2 = b2 > a2;
|
||||
>r2b2 : boolean
|
||||
>b2 > a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r2b3 = b3 > a3;
|
||||
>r2b3 : boolean
|
||||
>b3 > a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r2b4 = b4 > a4;
|
||||
>r2b4 : boolean
|
||||
>b4 > a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r2b5 = b5 > a5;
|
||||
>r2b5 : boolean
|
||||
>b5 > a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r2b6 = b6 > a6;
|
||||
>r2b6 : boolean
|
||||
>b6 > a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
>r3a1 : boolean
|
||||
>a1 <= b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r3a2 = a2 <= b2;
|
||||
>r3a2 : boolean
|
||||
>a2 <= b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r3a3 = a3 <= b3;
|
||||
>r3a3 : boolean
|
||||
>a3 <= b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r3a4 = a4 <= b4;
|
||||
>r3a4 : boolean
|
||||
>a4 <= b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r3a5 = a5 <= b5;
|
||||
>r3a5 : boolean
|
||||
>a5 <= b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r3a6 = a6 <= b6;
|
||||
>r3a6 : boolean
|
||||
>a6 <= b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
>r3b1 : boolean
|
||||
>b1 <= a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r3b2 = b2 <= a2;
|
||||
>r3b2 : boolean
|
||||
>b2 <= a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r3b3 = b3 <= a3;
|
||||
>r3b3 : boolean
|
||||
>b3 <= a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r3b4 = b4 <= a4;
|
||||
>r3b4 : boolean
|
||||
>b4 <= a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r3b5 = b5 <= a5;
|
||||
>r3b5 : boolean
|
||||
>b5 <= a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r3b6 = b6 <= a6;
|
||||
>r3b6 : boolean
|
||||
>b6 <= a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
>r4a1 : boolean
|
||||
>a1 >= b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r4a2 = a2 >= b2;
|
||||
>r4a2 : boolean
|
||||
>a2 >= b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r4a3 = a3 >= b3;
|
||||
>r4a3 : boolean
|
||||
>a3 >= b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r4a4 = a4 >= b4;
|
||||
>r4a4 : boolean
|
||||
>a4 >= b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r4a5 = a5 >= b5;
|
||||
>r4a5 : boolean
|
||||
>a5 >= b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r4a6 = a6 >= b6;
|
||||
>r4a6 : boolean
|
||||
>a6 >= b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
>r4b1 : boolean
|
||||
>b1 >= a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r4b2 = b2 >= a2;
|
||||
>r4b2 : boolean
|
||||
>b2 >= a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r4b3 = b3 >= a3;
|
||||
>r4b3 : boolean
|
||||
>b3 >= a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r4b4 = b4 >= a4;
|
||||
>r4b4 : boolean
|
||||
>b4 >= a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r4b5 = b5 >= a5;
|
||||
>r4b5 : boolean
|
||||
>b5 >= a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r4b6 = b6 >= a6;
|
||||
>r4b6 : boolean
|
||||
>b6 >= a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
>r5a1 : boolean
|
||||
>a1 == b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r5a2 = a2 == b2;
|
||||
>r5a2 : boolean
|
||||
>a2 == b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r5a3 = a3 == b3;
|
||||
>r5a3 : boolean
|
||||
>a3 == b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r5a4 = a4 == b4;
|
||||
>r5a4 : boolean
|
||||
>a4 == b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r5a5 = a5 == b5;
|
||||
>r5a5 : boolean
|
||||
>a5 == b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r5a6 = a6 == b6;
|
||||
>r5a6 : boolean
|
||||
>a6 == b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
>r5b1 : boolean
|
||||
>b1 == a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r5b2 = b2 == a2;
|
||||
>r5b2 : boolean
|
||||
>b2 == a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r5b3 = b3 == a3;
|
||||
>r5b3 : boolean
|
||||
>b3 == a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r5b4 = b4 == a4;
|
||||
>r5b4 : boolean
|
||||
>b4 == a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r5b5 = b5 == a5;
|
||||
>r5b5 : boolean
|
||||
>b5 == a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r5b6 = b6 == a6;
|
||||
>r5b6 : boolean
|
||||
>b6 == a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
>r6a1 : boolean
|
||||
>a1 != b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r6a2 = a2 != b2;
|
||||
>r6a2 : boolean
|
||||
>a2 != b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r6a3 = a3 != b3;
|
||||
>r6a3 : boolean
|
||||
>a3 != b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r6a4 = a4 != b4;
|
||||
>r6a4 : boolean
|
||||
>a4 != b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r6a5 = a5 != b5;
|
||||
>r6a5 : boolean
|
||||
>a5 != b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r6a6 = a6 != b6;
|
||||
>r6a6 : boolean
|
||||
>a6 != b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
>r6b1 : boolean
|
||||
>b1 != a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r6b2 = b2 != a2;
|
||||
>r6b2 : boolean
|
||||
>b2 != a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r6b3 = b3 != a3;
|
||||
>r6b3 : boolean
|
||||
>b3 != a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r6b4 = b4 != a4;
|
||||
>r6b4 : boolean
|
||||
>b4 != a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r6b5 = b5 != a5;
|
||||
>r6b5 : boolean
|
||||
>b5 != a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r6b6 = b6 != a6;
|
||||
>r6b6 : boolean
|
||||
>b6 != a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
>r7a1 : boolean
|
||||
>a1 === b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r7a2 = a2 === b2;
|
||||
>r7a2 : boolean
|
||||
>a2 === b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r7a3 = a3 === b3;
|
||||
>r7a3 : boolean
|
||||
>a3 === b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r7a4 = a4 === b4;
|
||||
>r7a4 : boolean
|
||||
>a4 === b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r7a5 = a5 === b5;
|
||||
>r7a5 : boolean
|
||||
>a5 === b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r7a6 = a6 === b6;
|
||||
>r7a6 : boolean
|
||||
>a6 === b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
>r7b1 : boolean
|
||||
>b1 === a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r7b2 = b2 === a2;
|
||||
>r7b2 : boolean
|
||||
>b2 === a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r7b3 = b3 === a3;
|
||||
>r7b3 : boolean
|
||||
>b3 === a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r7b4 = b4 === a4;
|
||||
>r7b4 : boolean
|
||||
>b4 === a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r7b5 = b5 === a5;
|
||||
>r7b5 : boolean
|
||||
>b5 === a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r7b6 = b6 === a6;
|
||||
>r7b6 : boolean
|
||||
>b6 === a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
>r8a1 : boolean
|
||||
>a1 !== b1 : boolean
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
>b1 : { fn(): string; }
|
||||
|
||||
var r8a2 = a2 !== b2;
|
||||
>r8a2 : boolean
|
||||
>a2 !== b2 : boolean
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
>b2 : { fn(x: string): number; }
|
||||
|
||||
var r8a3 = a3 !== b3;
|
||||
>r8a3 : boolean
|
||||
>a3 !== b3 : boolean
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
>b3 : { fn(x?: string): number; }
|
||||
|
||||
var r8a4 = a4 !== b4;
|
||||
>r8a4 : boolean
|
||||
>a4 !== b4 : boolean
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
|
||||
var r8a5 = a5 !== b5;
|
||||
>r8a5 : boolean
|
||||
>a5 !== b5 : boolean
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
|
||||
var r8a6 = a6 !== b6;
|
||||
>r8a6 : boolean
|
||||
>a6 !== b6 : boolean
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
>r8b1 : boolean
|
||||
>b1 !== a1 : boolean
|
||||
>b1 : { fn(): string; }
|
||||
>a1 : { fn<T>(x: T): T; }
|
||||
|
||||
var r8b2 = b2 !== a2;
|
||||
>r8b2 : boolean
|
||||
>b2 !== a2 : boolean
|
||||
>b2 : { fn(x: string): number; }
|
||||
>a2 : { fn<T>(x: T): T; }
|
||||
|
||||
var r8b3 = b3 !== a3;
|
||||
>r8b3 : boolean
|
||||
>b3 !== a3 : boolean
|
||||
>b3 : { fn(x?: string): number; }
|
||||
>a3 : { fn<T>(x?: T): T; }
|
||||
|
||||
var r8b4 = b4 !== a4;
|
||||
>r8b4 : boolean
|
||||
>b4 !== a4 : boolean
|
||||
>b4 : { fn(...x: string[]): number; }
|
||||
>a4 : { fn<T>(...x: T[]): T; }
|
||||
|
||||
var r8b5 = b5 !== a5;
|
||||
>r8b5 : boolean
|
||||
>b5 !== a5 : boolean
|
||||
>b5 : { fn(x: string, y: number): string; }
|
||||
>a5 : { fn<T>(x: T, y: T): T; }
|
||||
|
||||
var r8b6 = b6 !== a6;
|
||||
>r8b6 : boolean
|
||||
>b6 !== a6 : boolean
|
||||
>b6 : { fn(x: Base, y: C): Base; }
|
||||
>a6 : { fn<T, U extends T>(x: T, y: U): T; }
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts(28,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts (1 errors) ====
|
||||
class Base {
|
||||
public a: string;
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
public b: string;
|
||||
}
|
||||
|
||||
class C {
|
||||
public c: string;
|
||||
}
|
||||
|
||||
var a1: { new <T>(x: T): T };
|
||||
var b1: { new (): string };
|
||||
|
||||
var a2: { new <T>(x: T): T };
|
||||
var b2: { new (x: string): number };
|
||||
|
||||
var a3: { new <T>(x?: T): T };
|
||||
var b3: { new (x?: string): number };
|
||||
|
||||
var a4: { new <T>(...x: T[]): T };
|
||||
var b4: { new (...x: string[]): number };
|
||||
|
||||
var a5: { new <T>(x: T, y: T): T };
|
||||
var b5: { new (x: string, y: number): string };
|
||||
|
||||
var a6: { new <T, U extends T>(x: T, y: U): T };
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b6: { new (x: Base, y: C): Base };
|
||||
|
||||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
var r1a2 = a2 < b2;
|
||||
var r1a3 = a3 < b3;
|
||||
var r1a4 = a4 < b4;
|
||||
var r1a5 = a5 < b5;
|
||||
var r1a6 = a6 < b6;
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
var r1b2 = b2 < a2;
|
||||
var r1b3 = b3 < a3;
|
||||
var r1b4 = b4 < a4;
|
||||
var r1b5 = b5 < a5;
|
||||
var r1b6 = b6 < a6;
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
var r2a2 = a2 > b2;
|
||||
var r2a3 = a3 > b3;
|
||||
var r2a4 = a4 > b4;
|
||||
var r2a5 = a5 > b5;
|
||||
var r2a6 = a6 > b6;
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
var r2b2 = b2 > a2;
|
||||
var r2b3 = b3 > a3;
|
||||
var r2b4 = b4 > a4;
|
||||
var r2b5 = b5 > a5;
|
||||
var r2b6 = b6 > a6;
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
var r3a2 = a2 <= b2;
|
||||
var r3a3 = a3 <= b3;
|
||||
var r3a4 = a4 <= b4;
|
||||
var r3a5 = a5 <= b5;
|
||||
var r3a6 = a6 <= b6;
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
var r3b2 = b2 <= a2;
|
||||
var r3b3 = b3 <= a3;
|
||||
var r3b4 = b4 <= a4;
|
||||
var r3b5 = b5 <= a5;
|
||||
var r3b6 = b6 <= a6;
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
var r4a2 = a2 >= b2;
|
||||
var r4a3 = a3 >= b3;
|
||||
var r4a4 = a4 >= b4;
|
||||
var r4a5 = a5 >= b5;
|
||||
var r4a6 = a6 >= b6;
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
var r4b2 = b2 >= a2;
|
||||
var r4b3 = b3 >= a3;
|
||||
var r4b4 = b4 >= a4;
|
||||
var r4b5 = b5 >= a5;
|
||||
var r4b6 = b6 >= a6;
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
var r5a2 = a2 == b2;
|
||||
var r5a3 = a3 == b3;
|
||||
var r5a4 = a4 == b4;
|
||||
var r5a5 = a5 == b5;
|
||||
var r5a6 = a6 == b6;
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
var r5b2 = b2 == a2;
|
||||
var r5b3 = b3 == a3;
|
||||
var r5b4 = b4 == a4;
|
||||
var r5b5 = b5 == a5;
|
||||
var r5b6 = b6 == a6;
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
var r6a2 = a2 != b2;
|
||||
var r6a3 = a3 != b3;
|
||||
var r6a4 = a4 != b4;
|
||||
var r6a5 = a5 != b5;
|
||||
var r6a6 = a6 != b6;
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
var r6b2 = b2 != a2;
|
||||
var r6b3 = b3 != a3;
|
||||
var r6b4 = b4 != a4;
|
||||
var r6b5 = b5 != a5;
|
||||
var r6b6 = b6 != a6;
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
var r7a2 = a2 === b2;
|
||||
var r7a3 = a3 === b3;
|
||||
var r7a4 = a4 === b4;
|
||||
var r7a5 = a5 === b5;
|
||||
var r7a6 = a6 === b6;
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
var r7b2 = b2 === a2;
|
||||
var r7b3 = b3 === a3;
|
||||
var r7b4 = b4 === a4;
|
||||
var r7b5 = b5 === a5;
|
||||
var r7b6 = b6 === a6;
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
var r8a2 = a2 !== b2;
|
||||
var r8a3 = a3 !== b3;
|
||||
var r8a4 = a4 !== b4;
|
||||
var r8a5 = a5 !== b5;
|
||||
var r8a6 = a6 !== b6;
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
var r8b2 = b2 !== a2;
|
||||
var r8b3 = b3 !== a3;
|
||||
var r8b4 = b4 !== a4;
|
||||
var r8b5 = b5 !== a5;
|
||||
var r8b6 = b6 !== a6;
|
||||
@@ -0,0 +1,587 @@
|
||||
=== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts ===
|
||||
class Base {
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 0, 0))
|
||||
|
||||
public a: string;
|
||||
>a : Symbol(a, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 0, 12))
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
>Derived : Symbol(Derived, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 2, 1))
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 0, 0))
|
||||
|
||||
public b: string;
|
||||
>b : Symbol(b, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 4, 28))
|
||||
}
|
||||
|
||||
class C {
|
||||
>C : Symbol(C, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 6, 1))
|
||||
|
||||
public c: string;
|
||||
>c : Symbol(c, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 8, 9))
|
||||
}
|
||||
|
||||
var a1: { new <T>(x: T): T };
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 15))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 18))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 15))
|
||||
|
||||
var b1: { new (): string };
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var a2: { new <T>(x: T): T };
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 15))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 18))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 15))
|
||||
|
||||
var b2: { new (x: string): number };
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 15))
|
||||
|
||||
var a3: { new <T>(x?: T): T };
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 15))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 18))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 15))
|
||||
|
||||
var b3: { new (x?: string): number };
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 15))
|
||||
|
||||
var a4: { new <T>(...x: T[]): T };
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 15))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 18))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 15))
|
||||
|
||||
var b4: { new (...x: string[]): number };
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 15))
|
||||
|
||||
var a5: { new <T>(x: T, y: T): T };
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 15))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 18))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 15))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 23))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 15))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 15))
|
||||
|
||||
var b5: { new (x: string, y: number): string };
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 15))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 25))
|
||||
|
||||
var a6: { new <T, U extends T>(x: T, y: U): T };
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 15))
|
||||
>U : Symbol(U, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 17))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 15))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 31))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 15))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 36))
|
||||
>U : Symbol(U, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 17))
|
||||
>T : Symbol(T, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 15))
|
||||
|
||||
var b6: { new (x: Base, y: C): Base };
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>x : Symbol(x, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 15))
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 0, 0))
|
||||
>y : Symbol(y, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 23))
|
||||
>C : Symbol(C, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 6, 1))
|
||||
>Base : Symbol(Base, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 0, 0))
|
||||
|
||||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
>r1a1 : Symbol(r1a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 31, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r1a2 = a2 < b2;
|
||||
>r1a2 : Symbol(r1a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 32, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r1a3 = a3 < b3;
|
||||
>r1a3 : Symbol(r1a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 33, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r1a4 = a4 < b4;
|
||||
>r1a4 : Symbol(r1a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 34, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r1a5 = a5 < b5;
|
||||
>r1a5 : Symbol(r1a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 35, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r1a6 = a6 < b6;
|
||||
>r1a6 : Symbol(r1a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 36, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
>r1b1 : Symbol(r1b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 38, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r1b2 = b2 < a2;
|
||||
>r1b2 : Symbol(r1b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 39, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r1b3 = b3 < a3;
|
||||
>r1b3 : Symbol(r1b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 40, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r1b4 = b4 < a4;
|
||||
>r1b4 : Symbol(r1b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 41, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r1b5 = b5 < a5;
|
||||
>r1b5 : Symbol(r1b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 42, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r1b6 = b6 < a6;
|
||||
>r1b6 : Symbol(r1b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 43, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
>r2a1 : Symbol(r2a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 46, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r2a2 = a2 > b2;
|
||||
>r2a2 : Symbol(r2a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 47, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r2a3 = a3 > b3;
|
||||
>r2a3 : Symbol(r2a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 48, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r2a4 = a4 > b4;
|
||||
>r2a4 : Symbol(r2a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 49, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r2a5 = a5 > b5;
|
||||
>r2a5 : Symbol(r2a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 50, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r2a6 = a6 > b6;
|
||||
>r2a6 : Symbol(r2a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 51, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
>r2b1 : Symbol(r2b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 53, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r2b2 = b2 > a2;
|
||||
>r2b2 : Symbol(r2b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 54, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r2b3 = b3 > a3;
|
||||
>r2b3 : Symbol(r2b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 55, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r2b4 = b4 > a4;
|
||||
>r2b4 : Symbol(r2b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 56, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r2b5 = b5 > a5;
|
||||
>r2b5 : Symbol(r2b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 57, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r2b6 = b6 > a6;
|
||||
>r2b6 : Symbol(r2b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 58, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
>r3a1 : Symbol(r3a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 61, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r3a2 = a2 <= b2;
|
||||
>r3a2 : Symbol(r3a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 62, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r3a3 = a3 <= b3;
|
||||
>r3a3 : Symbol(r3a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 63, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r3a4 = a4 <= b4;
|
||||
>r3a4 : Symbol(r3a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 64, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r3a5 = a5 <= b5;
|
||||
>r3a5 : Symbol(r3a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 65, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r3a6 = a6 <= b6;
|
||||
>r3a6 : Symbol(r3a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 66, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
>r3b1 : Symbol(r3b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 68, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r3b2 = b2 <= a2;
|
||||
>r3b2 : Symbol(r3b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 69, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r3b3 = b3 <= a3;
|
||||
>r3b3 : Symbol(r3b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 70, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r3b4 = b4 <= a4;
|
||||
>r3b4 : Symbol(r3b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 71, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r3b5 = b5 <= a5;
|
||||
>r3b5 : Symbol(r3b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 72, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r3b6 = b6 <= a6;
|
||||
>r3b6 : Symbol(r3b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 73, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
>r4a1 : Symbol(r4a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 76, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r4a2 = a2 >= b2;
|
||||
>r4a2 : Symbol(r4a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 77, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r4a3 = a3 >= b3;
|
||||
>r4a3 : Symbol(r4a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 78, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r4a4 = a4 >= b4;
|
||||
>r4a4 : Symbol(r4a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 79, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r4a5 = a5 >= b5;
|
||||
>r4a5 : Symbol(r4a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 80, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r4a6 = a6 >= b6;
|
||||
>r4a6 : Symbol(r4a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 81, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
>r4b1 : Symbol(r4b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 83, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r4b2 = b2 >= a2;
|
||||
>r4b2 : Symbol(r4b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 84, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r4b3 = b3 >= a3;
|
||||
>r4b3 : Symbol(r4b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 85, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r4b4 = b4 >= a4;
|
||||
>r4b4 : Symbol(r4b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 86, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r4b5 = b5 >= a5;
|
||||
>r4b5 : Symbol(r4b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 87, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r4b6 = b6 >= a6;
|
||||
>r4b6 : Symbol(r4b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 88, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
>r5a1 : Symbol(r5a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 91, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r5a2 = a2 == b2;
|
||||
>r5a2 : Symbol(r5a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 92, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r5a3 = a3 == b3;
|
||||
>r5a3 : Symbol(r5a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 93, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r5a4 = a4 == b4;
|
||||
>r5a4 : Symbol(r5a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 94, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r5a5 = a5 == b5;
|
||||
>r5a5 : Symbol(r5a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 95, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r5a6 = a6 == b6;
|
||||
>r5a6 : Symbol(r5a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 96, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
>r5b1 : Symbol(r5b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 98, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r5b2 = b2 == a2;
|
||||
>r5b2 : Symbol(r5b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 99, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r5b3 = b3 == a3;
|
||||
>r5b3 : Symbol(r5b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 100, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r5b4 = b4 == a4;
|
||||
>r5b4 : Symbol(r5b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 101, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r5b5 = b5 == a5;
|
||||
>r5b5 : Symbol(r5b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 102, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r5b6 = b6 == a6;
|
||||
>r5b6 : Symbol(r5b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 103, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
>r6a1 : Symbol(r6a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 106, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r6a2 = a2 != b2;
|
||||
>r6a2 : Symbol(r6a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 107, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r6a3 = a3 != b3;
|
||||
>r6a3 : Symbol(r6a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 108, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r6a4 = a4 != b4;
|
||||
>r6a4 : Symbol(r6a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 109, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r6a5 = a5 != b5;
|
||||
>r6a5 : Symbol(r6a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 110, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r6a6 = a6 != b6;
|
||||
>r6a6 : Symbol(r6a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 111, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
>r6b1 : Symbol(r6b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 113, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r6b2 = b2 != a2;
|
||||
>r6b2 : Symbol(r6b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 114, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r6b3 = b3 != a3;
|
||||
>r6b3 : Symbol(r6b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 115, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r6b4 = b4 != a4;
|
||||
>r6b4 : Symbol(r6b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 116, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r6b5 = b5 != a5;
|
||||
>r6b5 : Symbol(r6b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 117, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r6b6 = b6 != a6;
|
||||
>r6b6 : Symbol(r6b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 118, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
>r7a1 : Symbol(r7a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 121, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r7a2 = a2 === b2;
|
||||
>r7a2 : Symbol(r7a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 122, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r7a3 = a3 === b3;
|
||||
>r7a3 : Symbol(r7a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 123, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r7a4 = a4 === b4;
|
||||
>r7a4 : Symbol(r7a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 124, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r7a5 = a5 === b5;
|
||||
>r7a5 : Symbol(r7a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 125, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r7a6 = a6 === b6;
|
||||
>r7a6 : Symbol(r7a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 126, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
>r7b1 : Symbol(r7b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 128, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r7b2 = b2 === a2;
|
||||
>r7b2 : Symbol(r7b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 129, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r7b3 = b3 === a3;
|
||||
>r7b3 : Symbol(r7b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 130, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r7b4 = b4 === a4;
|
||||
>r7b4 : Symbol(r7b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 131, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r7b5 = b5 === a5;
|
||||
>r7b5 : Symbol(r7b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 132, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r7b6 = b6 === a6;
|
||||
>r7b6 : Symbol(r7b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 133, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
>r8a1 : Symbol(r8a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 136, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
|
||||
var r8a2 = a2 !== b2;
|
||||
>r8a2 : Symbol(r8a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 137, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
|
||||
var r8a3 = a3 !== b3;
|
||||
>r8a3 : Symbol(r8a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 138, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
|
||||
var r8a4 = a4 !== b4;
|
||||
>r8a4 : Symbol(r8a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 139, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
|
||||
var r8a5 = a5 !== b5;
|
||||
>r8a5 : Symbol(r8a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 140, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
|
||||
var r8a6 = a6 !== b6;
|
||||
>r8a6 : Symbol(r8a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 141, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
>r8b1 : Symbol(r8b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 143, 3))
|
||||
>b1 : Symbol(b1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 13, 3))
|
||||
>a1 : Symbol(a1, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 12, 3))
|
||||
|
||||
var r8b2 = b2 !== a2;
|
||||
>r8b2 : Symbol(r8b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 144, 3))
|
||||
>b2 : Symbol(b2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 16, 3))
|
||||
>a2 : Symbol(a2, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 15, 3))
|
||||
|
||||
var r8b3 = b3 !== a3;
|
||||
>r8b3 : Symbol(r8b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 145, 3))
|
||||
>b3 : Symbol(b3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 19, 3))
|
||||
>a3 : Symbol(a3, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 18, 3))
|
||||
|
||||
var r8b4 = b4 !== a4;
|
||||
>r8b4 : Symbol(r8b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 146, 3))
|
||||
>b4 : Symbol(b4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 22, 3))
|
||||
>a4 : Symbol(a4, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 21, 3))
|
||||
|
||||
var r8b5 = b5 !== a5;
|
||||
>r8b5 : Symbol(r8b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 147, 3))
|
||||
>b5 : Symbol(b5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 25, 3))
|
||||
>a5 : Symbol(a5, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 24, 3))
|
||||
|
||||
var r8b6 = b6 !== a6;
|
||||
>r8b6 : Symbol(r8b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 148, 3))
|
||||
>b6 : Symbol(b6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 28, 3))
|
||||
>a6 : Symbol(a6, Decl(comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts, 27, 3))
|
||||
|
||||
@@ -0,0 +1,683 @@
|
||||
=== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts ===
|
||||
class Base {
|
||||
>Base : Base
|
||||
|
||||
public a: string;
|
||||
>a : string
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
>Derived : Derived
|
||||
>Base : Base
|
||||
|
||||
public b: string;
|
||||
>b : string
|
||||
}
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
public c: string;
|
||||
>c : string
|
||||
}
|
||||
|
||||
var a1: { new <T>(x: T): T };
|
||||
>a1 : new <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b1: { new (): string };
|
||||
>b1 : new () => string
|
||||
|
||||
var a2: { new <T>(x: T): T };
|
||||
>a2 : new <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b2: { new (x: string): number };
|
||||
>b2 : new (x: string) => number
|
||||
>x : string
|
||||
|
||||
var a3: { new <T>(x?: T): T };
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b3: { new (x?: string): number };
|
||||
>b3 : new (x?: string) => number
|
||||
>x : string
|
||||
|
||||
var a4: { new <T>(...x: T[]): T };
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>T : T
|
||||
>x : T[]
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b4: { new (...x: string[]): number };
|
||||
>b4 : new (...x: string[]) => number
|
||||
>x : string[]
|
||||
|
||||
var a5: { new <T>(x: T, y: T): T };
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>y : T
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
var b5: { new (x: string, y: number): string };
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>x : string
|
||||
>y : number
|
||||
|
||||
var a6: { new <T, U extends T>(x: T, y: U): T };
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>T : T
|
||||
|
||||
var b6: { new (x: Base, y: C): Base };
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>x : Base
|
||||
>Base : Base
|
||||
>y : C
|
||||
>C : C
|
||||
>Base : Base
|
||||
|
||||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
>r1a1 : boolean
|
||||
>a1 < b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r1a2 = a2 < b2;
|
||||
>r1a2 : boolean
|
||||
>a2 < b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r1a3 = a3 < b3;
|
||||
>r1a3 : boolean
|
||||
>a3 < b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r1a4 = a4 < b4;
|
||||
>r1a4 : boolean
|
||||
>a4 < b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r1a5 = a5 < b5;
|
||||
>r1a5 : boolean
|
||||
>a5 < b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r1a6 = a6 < b6;
|
||||
>r1a6 : boolean
|
||||
>a6 < b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
>r1b1 : boolean
|
||||
>b1 < a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r1b2 = b2 < a2;
|
||||
>r1b2 : boolean
|
||||
>b2 < a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r1b3 = b3 < a3;
|
||||
>r1b3 : boolean
|
||||
>b3 < a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r1b4 = b4 < a4;
|
||||
>r1b4 : boolean
|
||||
>b4 < a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r1b5 = b5 < a5;
|
||||
>r1b5 : boolean
|
||||
>b5 < a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r1b6 = b6 < a6;
|
||||
>r1b6 : boolean
|
||||
>b6 < a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
>r2a1 : boolean
|
||||
>a1 > b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r2a2 = a2 > b2;
|
||||
>r2a2 : boolean
|
||||
>a2 > b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r2a3 = a3 > b3;
|
||||
>r2a3 : boolean
|
||||
>a3 > b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r2a4 = a4 > b4;
|
||||
>r2a4 : boolean
|
||||
>a4 > b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r2a5 = a5 > b5;
|
||||
>r2a5 : boolean
|
||||
>a5 > b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r2a6 = a6 > b6;
|
||||
>r2a6 : boolean
|
||||
>a6 > b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
>r2b1 : boolean
|
||||
>b1 > a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r2b2 = b2 > a2;
|
||||
>r2b2 : boolean
|
||||
>b2 > a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r2b3 = b3 > a3;
|
||||
>r2b3 : boolean
|
||||
>b3 > a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r2b4 = b4 > a4;
|
||||
>r2b4 : boolean
|
||||
>b4 > a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r2b5 = b5 > a5;
|
||||
>r2b5 : boolean
|
||||
>b5 > a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r2b6 = b6 > a6;
|
||||
>r2b6 : boolean
|
||||
>b6 > a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
>r3a1 : boolean
|
||||
>a1 <= b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r3a2 = a2 <= b2;
|
||||
>r3a2 : boolean
|
||||
>a2 <= b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r3a3 = a3 <= b3;
|
||||
>r3a3 : boolean
|
||||
>a3 <= b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r3a4 = a4 <= b4;
|
||||
>r3a4 : boolean
|
||||
>a4 <= b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r3a5 = a5 <= b5;
|
||||
>r3a5 : boolean
|
||||
>a5 <= b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r3a6 = a6 <= b6;
|
||||
>r3a6 : boolean
|
||||
>a6 <= b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
>r3b1 : boolean
|
||||
>b1 <= a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r3b2 = b2 <= a2;
|
||||
>r3b2 : boolean
|
||||
>b2 <= a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r3b3 = b3 <= a3;
|
||||
>r3b3 : boolean
|
||||
>b3 <= a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r3b4 = b4 <= a4;
|
||||
>r3b4 : boolean
|
||||
>b4 <= a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r3b5 = b5 <= a5;
|
||||
>r3b5 : boolean
|
||||
>b5 <= a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r3b6 = b6 <= a6;
|
||||
>r3b6 : boolean
|
||||
>b6 <= a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
>r4a1 : boolean
|
||||
>a1 >= b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r4a2 = a2 >= b2;
|
||||
>r4a2 : boolean
|
||||
>a2 >= b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r4a3 = a3 >= b3;
|
||||
>r4a3 : boolean
|
||||
>a3 >= b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r4a4 = a4 >= b4;
|
||||
>r4a4 : boolean
|
||||
>a4 >= b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r4a5 = a5 >= b5;
|
||||
>r4a5 : boolean
|
||||
>a5 >= b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r4a6 = a6 >= b6;
|
||||
>r4a6 : boolean
|
||||
>a6 >= b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
>r4b1 : boolean
|
||||
>b1 >= a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r4b2 = b2 >= a2;
|
||||
>r4b2 : boolean
|
||||
>b2 >= a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r4b3 = b3 >= a3;
|
||||
>r4b3 : boolean
|
||||
>b3 >= a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r4b4 = b4 >= a4;
|
||||
>r4b4 : boolean
|
||||
>b4 >= a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r4b5 = b5 >= a5;
|
||||
>r4b5 : boolean
|
||||
>b5 >= a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r4b6 = b6 >= a6;
|
||||
>r4b6 : boolean
|
||||
>b6 >= a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
>r5a1 : boolean
|
||||
>a1 == b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r5a2 = a2 == b2;
|
||||
>r5a2 : boolean
|
||||
>a2 == b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r5a3 = a3 == b3;
|
||||
>r5a3 : boolean
|
||||
>a3 == b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r5a4 = a4 == b4;
|
||||
>r5a4 : boolean
|
||||
>a4 == b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r5a5 = a5 == b5;
|
||||
>r5a5 : boolean
|
||||
>a5 == b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r5a6 = a6 == b6;
|
||||
>r5a6 : boolean
|
||||
>a6 == b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
>r5b1 : boolean
|
||||
>b1 == a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r5b2 = b2 == a2;
|
||||
>r5b2 : boolean
|
||||
>b2 == a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r5b3 = b3 == a3;
|
||||
>r5b3 : boolean
|
||||
>b3 == a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r5b4 = b4 == a4;
|
||||
>r5b4 : boolean
|
||||
>b4 == a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r5b5 = b5 == a5;
|
||||
>r5b5 : boolean
|
||||
>b5 == a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r5b6 = b6 == a6;
|
||||
>r5b6 : boolean
|
||||
>b6 == a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
>r6a1 : boolean
|
||||
>a1 != b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r6a2 = a2 != b2;
|
||||
>r6a2 : boolean
|
||||
>a2 != b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r6a3 = a3 != b3;
|
||||
>r6a3 : boolean
|
||||
>a3 != b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r6a4 = a4 != b4;
|
||||
>r6a4 : boolean
|
||||
>a4 != b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r6a5 = a5 != b5;
|
||||
>r6a5 : boolean
|
||||
>a5 != b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r6a6 = a6 != b6;
|
||||
>r6a6 : boolean
|
||||
>a6 != b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
>r6b1 : boolean
|
||||
>b1 != a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r6b2 = b2 != a2;
|
||||
>r6b2 : boolean
|
||||
>b2 != a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r6b3 = b3 != a3;
|
||||
>r6b3 : boolean
|
||||
>b3 != a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r6b4 = b4 != a4;
|
||||
>r6b4 : boolean
|
||||
>b4 != a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r6b5 = b5 != a5;
|
||||
>r6b5 : boolean
|
||||
>b5 != a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r6b6 = b6 != a6;
|
||||
>r6b6 : boolean
|
||||
>b6 != a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
>r7a1 : boolean
|
||||
>a1 === b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r7a2 = a2 === b2;
|
||||
>r7a2 : boolean
|
||||
>a2 === b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r7a3 = a3 === b3;
|
||||
>r7a3 : boolean
|
||||
>a3 === b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r7a4 = a4 === b4;
|
||||
>r7a4 : boolean
|
||||
>a4 === b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r7a5 = a5 === b5;
|
||||
>r7a5 : boolean
|
||||
>a5 === b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r7a6 = a6 === b6;
|
||||
>r7a6 : boolean
|
||||
>a6 === b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
>r7b1 : boolean
|
||||
>b1 === a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r7b2 = b2 === a2;
|
||||
>r7b2 : boolean
|
||||
>b2 === a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r7b3 = b3 === a3;
|
||||
>r7b3 : boolean
|
||||
>b3 === a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r7b4 = b4 === a4;
|
||||
>r7b4 : boolean
|
||||
>b4 === a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r7b5 = b5 === a5;
|
||||
>r7b5 : boolean
|
||||
>b5 === a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r7b6 = b6 === a6;
|
||||
>r7b6 : boolean
|
||||
>b6 === a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
>r8a1 : boolean
|
||||
>a1 !== b1 : boolean
|
||||
>a1 : new <T>(x: T) => T
|
||||
>b1 : new () => string
|
||||
|
||||
var r8a2 = a2 !== b2;
|
||||
>r8a2 : boolean
|
||||
>a2 !== b2 : boolean
|
||||
>a2 : new <T>(x: T) => T
|
||||
>b2 : new (x: string) => number
|
||||
|
||||
var r8a3 = a3 !== b3;
|
||||
>r8a3 : boolean
|
||||
>a3 !== b3 : boolean
|
||||
>a3 : new <T>(x?: T) => T
|
||||
>b3 : new (x?: string) => number
|
||||
|
||||
var r8a4 = a4 !== b4;
|
||||
>r8a4 : boolean
|
||||
>a4 !== b4 : boolean
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
>b4 : new (...x: string[]) => number
|
||||
|
||||
var r8a5 = a5 !== b5;
|
||||
>r8a5 : boolean
|
||||
>a5 !== b5 : boolean
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
>b5 : new (x: string, y: number) => string
|
||||
|
||||
var r8a6 = a6 !== b6;
|
||||
>r8a6 : boolean
|
||||
>a6 !== b6 : boolean
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
>r8b1 : boolean
|
||||
>b1 !== a1 : boolean
|
||||
>b1 : new () => string
|
||||
>a1 : new <T>(x: T) => T
|
||||
|
||||
var r8b2 = b2 !== a2;
|
||||
>r8b2 : boolean
|
||||
>b2 !== a2 : boolean
|
||||
>b2 : new (x: string) => number
|
||||
>a2 : new <T>(x: T) => T
|
||||
|
||||
var r8b3 = b3 !== a3;
|
||||
>r8b3 : boolean
|
||||
>b3 !== a3 : boolean
|
||||
>b3 : new (x?: string) => number
|
||||
>a3 : new <T>(x?: T) => T
|
||||
|
||||
var r8b4 = b4 !== a4;
|
||||
>r8b4 : boolean
|
||||
>b4 !== a4 : boolean
|
||||
>b4 : new (...x: string[]) => number
|
||||
>a4 : new <T>(...x: T[]) => T
|
||||
|
||||
var r8b5 = b5 !== a5;
|
||||
>r8b5 : boolean
|
||||
>b5 !== a5 : boolean
|
||||
>b5 : new (x: string, y: number) => string
|
||||
>a5 : new <T>(x: T, y: T) => T
|
||||
|
||||
var r8b6 = b6 !== a6;
|
||||
>r8b6 : boolean
|
||||
>b6 !== a6 : boolean
|
||||
>b6 : new (x: Base, y: C) => Base
|
||||
>a6 : new <T, U extends T>(x: T, y: U) => T
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(5,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(8,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(10,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(13,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(21,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts(21,28): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts (6 errors) ====
|
||||
// used to be valid, now an error to do this
|
||||
|
||||
interface IComparable<T> {
|
||||
}
|
||||
function f<T, I extends IComparable<T>>() {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
interface I1<T, U extends I1<T, any>> { // Error, any does not satisfy the constraint I1<T, any>
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
interface I2<T, U extends T> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
interface I4<T, U extends () => T> {
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
// No error
|
||||
interface I3<T, U extends string> {
|
||||
method1<X, Y extends T>();
|
||||
}
|
||||
|
||||
function foo<T, U extends <V extends T>(v: V) => void>() {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
=== tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts ===
|
||||
// used to be valid, now an error to do this
|
||||
|
||||
interface IComparable<T> {
|
||||
>IComparable : Symbol(IComparable, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 2, 22))
|
||||
}
|
||||
function f<T, I extends IComparable<T>>() {
|
||||
>f : Symbol(f, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 3, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 4, 11))
|
||||
>I : Symbol(I, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 4, 13))
|
||||
>IComparable : Symbol(IComparable, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 4, 11))
|
||||
}
|
||||
|
||||
interface I1<T, U extends I1<T, any>> { // Error, any does not satisfy the constraint I1<T, any>
|
||||
>I1 : Symbol(I1, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 5, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 7, 13))
|
||||
>U : Symbol(U, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 7, 15))
|
||||
>I1 : Symbol(I1, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 5, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 7, 13))
|
||||
}
|
||||
interface I2<T, U extends T> {
|
||||
>I2 : Symbol(I2, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 8, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 9, 13))
|
||||
>U : Symbol(U, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 9, 15))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 9, 13))
|
||||
}
|
||||
|
||||
interface I4<T, U extends () => T> {
|
||||
>I4 : Symbol(I4, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 10, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 12, 13))
|
||||
>U : Symbol(U, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 12, 15))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 12, 13))
|
||||
}
|
||||
|
||||
// No error
|
||||
interface I3<T, U extends string> {
|
||||
>I3 : Symbol(I3, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 13, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 16, 13))
|
||||
>U : Symbol(U, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 16, 15))
|
||||
|
||||
method1<X, Y extends T>();
|
||||
>method1 : Symbol(method1, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 16, 35))
|
||||
>X : Symbol(X, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 17, 12))
|
||||
>Y : Symbol(Y, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 17, 14))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 16, 13))
|
||||
}
|
||||
|
||||
function foo<T, U extends <V extends T>(v: V) => void>() {
|
||||
>foo : Symbol(foo, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 18, 1))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 20, 13))
|
||||
>U : Symbol(U, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 20, 15))
|
||||
>V : Symbol(V, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 20, 27))
|
||||
>T : Symbol(T, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 20, 13))
|
||||
>v : Symbol(v, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 20, 40))
|
||||
>V : Symbol(V, Decl(constraintReferencingTypeParameterFromSameTypeParameterList.ts, 20, 27))
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
=== tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts ===
|
||||
// used to be valid, now an error to do this
|
||||
|
||||
interface IComparable<T> {
|
||||
>IComparable : IComparable<T>
|
||||
>T : T
|
||||
}
|
||||
function f<T, I extends IComparable<T>>() {
|
||||
>f : <T, I extends IComparable<T>>() => void
|
||||
>T : T
|
||||
>I : I
|
||||
>IComparable : IComparable<T>
|
||||
>T : T
|
||||
}
|
||||
|
||||
interface I1<T, U extends I1<T, any>> { // Error, any does not satisfy the constraint I1<T, any>
|
||||
>I1 : I1<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>I1 : I1<T, U>
|
||||
>T : T
|
||||
}
|
||||
interface I2<T, U extends T> {
|
||||
>I2 : I2<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
}
|
||||
|
||||
interface I4<T, U extends () => T> {
|
||||
>I4 : I4<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
}
|
||||
|
||||
// No error
|
||||
interface I3<T, U extends string> {
|
||||
>I3 : I3<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
method1<X, Y extends T>();
|
||||
>method1 : <X, Y extends T>() => any
|
||||
>X : X
|
||||
>Y : Y
|
||||
>T : T
|
||||
}
|
||||
|
||||
function foo<T, U extends <V extends T>(v: V) => void>() {
|
||||
>foo : <T, U extends <V extends T>(v: V) => void>() => void
|
||||
>T : T
|
||||
>U : U
|
||||
>V : V
|
||||
>T : T
|
||||
>v : V
|
||||
>V : V
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts(4,25): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts (1 errors) ====
|
||||
// errors expected for type parameter cannot be referenced in the constraints of the same list
|
||||
// any is not a valid type argument unless there is no constraint, or the constraint is any
|
||||
|
||||
declare function foo<Z, T extends <U>(x: U) => Z>(y: T): Z;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var a: any;
|
||||
|
||||
foo(a);
|
||||
foo<any, any>(a);
|
||||
@@ -0,0 +1,27 @@
|
||||
=== tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts ===
|
||||
// errors expected for type parameter cannot be referenced in the constraints of the same list
|
||||
// any is not a valid type argument unless there is no constraint, or the constraint is any
|
||||
|
||||
declare function foo<Z, T extends <U>(x: U) => Z>(y: T): Z;
|
||||
>foo : Symbol(foo, Decl(constraintSatisfactionWithAny2.ts, 0, 0))
|
||||
>Z : Symbol(Z, Decl(constraintSatisfactionWithAny2.ts, 3, 21))
|
||||
>T : Symbol(T, Decl(constraintSatisfactionWithAny2.ts, 3, 23))
|
||||
>U : Symbol(U, Decl(constraintSatisfactionWithAny2.ts, 3, 35))
|
||||
>x : Symbol(x, Decl(constraintSatisfactionWithAny2.ts, 3, 38))
|
||||
>U : Symbol(U, Decl(constraintSatisfactionWithAny2.ts, 3, 35))
|
||||
>Z : Symbol(Z, Decl(constraintSatisfactionWithAny2.ts, 3, 21))
|
||||
>y : Symbol(y, Decl(constraintSatisfactionWithAny2.ts, 3, 50))
|
||||
>T : Symbol(T, Decl(constraintSatisfactionWithAny2.ts, 3, 23))
|
||||
>Z : Symbol(Z, Decl(constraintSatisfactionWithAny2.ts, 3, 21))
|
||||
|
||||
var a: any;
|
||||
>a : Symbol(a, Decl(constraintSatisfactionWithAny2.ts, 4, 3))
|
||||
|
||||
foo(a);
|
||||
>foo : Symbol(foo, Decl(constraintSatisfactionWithAny2.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(constraintSatisfactionWithAny2.ts, 4, 3))
|
||||
|
||||
foo<any, any>(a);
|
||||
>foo : Symbol(foo, Decl(constraintSatisfactionWithAny2.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(constraintSatisfactionWithAny2.ts, 4, 3))
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
=== tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts ===
|
||||
// errors expected for type parameter cannot be referenced in the constraints of the same list
|
||||
// any is not a valid type argument unless there is no constraint, or the constraint is any
|
||||
|
||||
declare function foo<Z, T extends <U>(x: U) => Z>(y: T): Z;
|
||||
>foo : <Z, T extends <U>(x: U) => Z>(y: T) => Z
|
||||
>Z : Z
|
||||
>T : T
|
||||
>U : U
|
||||
>x : U
|
||||
>U : U
|
||||
>Z : Z
|
||||
>y : T
|
||||
>T : T
|
||||
>Z : Z
|
||||
|
||||
var a: any;
|
||||
>a : any
|
||||
|
||||
foo(a);
|
||||
>foo(a) : {}
|
||||
>foo : <Z, T extends <U>(x: U) => Z>(y: T) => Z
|
||||
>a : any
|
||||
|
||||
foo<any, any>(a);
|
||||
>foo<any, any>(a) : any
|
||||
>foo : <Z, T extends <U>(x: U) => Z>(y: T) => Z
|
||||
>a : any
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts(3,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts(4,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts (2 errors) ====
|
||||
interface Object { }
|
||||
|
||||
class Foo<T, U extends T> { }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
class Bar<T extends Object, U extends T> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
data: Foo<Object, Object>; // Error 1 Type 'Object' does not satisfy the constraint 'T' for type parameter 'U extends T'.
|
||||
}
|
||||
|
||||
var x: Foo< { a: string }, { a: string; b: number }>; // Error 2 Type '{ a: string; b: number; }' does not satisfy the constraint 'T' for type
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
=== tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts ===
|
||||
interface Object { }
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 0))
|
||||
|
||||
class Foo<T, U extends T> { }
|
||||
>Foo : Symbol(Foo, Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 20))
|
||||
>T : Symbol(T, Decl(constraintsThatReferenceOtherContstraints1.ts, 2, 10))
|
||||
>U : Symbol(U, Decl(constraintsThatReferenceOtherContstraints1.ts, 2, 12))
|
||||
>T : Symbol(T, Decl(constraintsThatReferenceOtherContstraints1.ts, 2, 10))
|
||||
|
||||
class Bar<T extends Object, U extends T> {
|
||||
>Bar : Symbol(Bar, Decl(constraintsThatReferenceOtherContstraints1.ts, 2, 29))
|
||||
>T : Symbol(T, Decl(constraintsThatReferenceOtherContstraints1.ts, 3, 10))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 0))
|
||||
>U : Symbol(U, Decl(constraintsThatReferenceOtherContstraints1.ts, 3, 27))
|
||||
>T : Symbol(T, Decl(constraintsThatReferenceOtherContstraints1.ts, 3, 10))
|
||||
|
||||
data: Foo<Object, Object>; // Error 1 Type 'Object' does not satisfy the constraint 'T' for type parameter 'U extends T'.
|
||||
>data : Symbol(data, Decl(constraintsThatReferenceOtherContstraints1.ts, 3, 42))
|
||||
>Foo : Symbol(Foo, Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 20))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 0))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 0))
|
||||
}
|
||||
|
||||
var x: Foo< { a: string }, { a: string; b: number }>; // Error 2 Type '{ a: string; b: number; }' does not satisfy the constraint 'T' for type
|
||||
>x : Symbol(x, Decl(constraintsThatReferenceOtherContstraints1.ts, 7, 3))
|
||||
>Foo : Symbol(Foo, Decl(constraintsThatReferenceOtherContstraints1.ts, 0, 20))
|
||||
>a : Symbol(a, Decl(constraintsThatReferenceOtherContstraints1.ts, 7, 13))
|
||||
>a : Symbol(a, Decl(constraintsThatReferenceOtherContstraints1.ts, 7, 28))
|
||||
>b : Symbol(b, Decl(constraintsThatReferenceOtherContstraints1.ts, 7, 39))
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
=== tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts ===
|
||||
interface Object { }
|
||||
>Object : Object
|
||||
|
||||
class Foo<T, U extends T> { }
|
||||
>Foo : Foo<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
|
||||
class Bar<T extends Object, U extends T> {
|
||||
>Bar : Bar<T, U>
|
||||
>T : T
|
||||
>Object : Object
|
||||
>U : U
|
||||
>T : T
|
||||
|
||||
data: Foo<Object, Object>; // Error 1 Type 'Object' does not satisfy the constraint 'T' for type parameter 'U extends T'.
|
||||
>data : Foo<Object, Object>
|
||||
>Foo : Foo<T, U>
|
||||
>Object : Object
|
||||
>Object : Object
|
||||
}
|
||||
|
||||
var x: Foo< { a: string }, { a: string; b: number }>; // Error 2 Type '{ a: string; b: number; }' does not satisfy the constraint 'T' for type
|
||||
>x : Foo<{ a: string; }, { a: string; b: number; }>
|
||||
>Foo : Foo<T, U>
|
||||
>a : string
|
||||
>a : string
|
||||
>b : number
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/compiler/contextuallyTypingOrOperator3.ts(1,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextuallyTypingOrOperator3.ts (1 errors) ====
|
||||
function foo<T, U extends T>(u: U) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var x3: U = u || u;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
=== tests/cases/compiler/contextuallyTypingOrOperator3.ts ===
|
||||
function foo<T, U extends T>(u: U) {
|
||||
>foo : Symbol(foo, Decl(contextuallyTypingOrOperator3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(contextuallyTypingOrOperator3.ts, 0, 13))
|
||||
>U : Symbol(U, Decl(contextuallyTypingOrOperator3.ts, 0, 15))
|
||||
>T : Symbol(T, Decl(contextuallyTypingOrOperator3.ts, 0, 13))
|
||||
>u : Symbol(u, Decl(contextuallyTypingOrOperator3.ts, 0, 29))
|
||||
>U : Symbol(U, Decl(contextuallyTypingOrOperator3.ts, 0, 15))
|
||||
|
||||
var x3: U = u || u;
|
||||
>x3 : Symbol(x3, Decl(contextuallyTypingOrOperator3.ts, 1, 7))
|
||||
>U : Symbol(U, Decl(contextuallyTypingOrOperator3.ts, 0, 15))
|
||||
>u : Symbol(u, Decl(contextuallyTypingOrOperator3.ts, 0, 29))
|
||||
>u : Symbol(u, Decl(contextuallyTypingOrOperator3.ts, 0, 29))
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
=== tests/cases/compiler/contextuallyTypingOrOperator3.ts ===
|
||||
function foo<T, U extends T>(u: U) {
|
||||
>foo : <T, U extends T>(u: U) => void
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
>u : U
|
||||
>U : U
|
||||
|
||||
var x3: U = u || u;
|
||||
>x3 : U
|
||||
>U : U
|
||||
>u || u : U
|
||||
>u : U
|
||||
>u : U
|
||||
}
|
||||
@@ -20,7 +20,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(43,9): error TS2322: Type 'E' is not assignable to type '<T>(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String'.
|
||||
Property 'charAt' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(47,21): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(48,9): error TS2322: Type 'E' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(49,9): error TS2322: Type 'E' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(50,9): error TS2322: Type 'E' is not assignable to type 'V'.
|
||||
@@ -28,7 +27,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(52,13): error TS2322: Type 'E' is not assignable to type 'B'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts (21 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts (20 errors) ====
|
||||
// enums assignable to number, any, Object, errors unless otherwise noted
|
||||
|
||||
enum E { A }
|
||||
@@ -113,8 +112,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
!!! error TS2322: Property 'charAt' is missing in type 'Number'.
|
||||
|
||||
function foo<T, U extends T, V extends Date, A extends Number, B extends E>(x: T, y: U, z: V) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
x = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'T'.
|
||||
|
||||
@@ -13,11 +13,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotA
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(95,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof f'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(105,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof c'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(111,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(115,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'U'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts (17 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts (16 errors) ====
|
||||
// enums are only subtypes of number, any and no other types
|
||||
|
||||
enum E { A }
|
||||
@@ -163,8 +162,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotA
|
||||
|
||||
|
||||
interface I18<T, U extends T> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
[x: string]: U;
|
||||
foo: E;
|
||||
~~~~~~~
|
||||
|
||||
@@ -12,13 +12,14 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(29,16): error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(30,16): error TS2345: Argument of type 'new <T>(x: T) => T' is not assignable to parameter of type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(34,16): error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(36,38): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(37,10): error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'.
|
||||
Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(38,10): error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'.
|
||||
Type 'T' is not assignable to type '(x: string) => string'.
|
||||
Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts (14 errors) ====
|
||||
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts (13 errors) ====
|
||||
// satisfaction of a constraint to Function, all of these invocations are errors unless otherwise noted
|
||||
|
||||
function foo<T extends Function>(x: T): T { return x; }
|
||||
@@ -80,8 +81,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
!!! error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'.
|
||||
|
||||
function fff<T extends { (): void }, U extends T>(x: T, y: U) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo2(x);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'.
|
||||
@@ -89,5 +88,7 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
foo2(y);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Type 'T' is not assignable to type '(x: string) => string'.
|
||||
!!! error TS2345: Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
}
|
||||
|
||||
@@ -4,12 +4,9 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(32,10): error TS2354: No best common type exists among return expressions.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(44,10): error TS2354: No best common type exists among return expressions.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(49,10): error TS2354: No best common type exists among return expressions.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(57,10): error TS2354: No best common type exists among return expressions.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(57,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(57,26): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts (9 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts (6 errors) ====
|
||||
|
||||
// return type of a function with multiple returns is the BCT of each return statement
|
||||
// it is an error if there is no single BCT, these are error cases
|
||||
@@ -79,12 +76,6 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti
|
||||
}
|
||||
|
||||
function f8<T extends U, U extends V, V>(x: T, y: U) {
|
||||
~~
|
||||
!!! error TS2354: No best common type exists among return expressions.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
if (true) {
|
||||
return x;
|
||||
} else {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(1,27): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(2,27): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts (2 errors) ====
|
||||
var x1 = function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var x2 = function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
x1 = x2;
|
||||
x2 = x1;
|
||||
@@ -0,0 +1,35 @@
|
||||
=== tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts ===
|
||||
var x1 = function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { }
|
||||
>x1 : Symbol(x1, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 3))
|
||||
>foo3 : Symbol(foo3, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 8))
|
||||
>T : Symbol(T, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 23))
|
||||
>U : Symbol(U, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 25))
|
||||
>a : Symbol(a, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 37))
|
||||
>T : Symbol(T, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 23))
|
||||
>b : Symbol(b, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 43))
|
||||
>x : Symbol(x, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 57))
|
||||
>T : Symbol(T, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 23))
|
||||
>z : Symbol(z, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 62))
|
||||
>U : Symbol(U, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 25))
|
||||
|
||||
var x2 = function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { }
|
||||
>x2 : Symbol(x2, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 3))
|
||||
>foo3 : Symbol(foo3, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 8))
|
||||
>T : Symbol(T, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 23))
|
||||
>U : Symbol(U, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 25))
|
||||
>a : Symbol(a, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 37))
|
||||
>T : Symbol(T, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 23))
|
||||
>b : Symbol(b, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 43))
|
||||
>x : Symbol(x, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 57))
|
||||
>T : Symbol(T, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 23))
|
||||
>z : Symbol(z, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 62))
|
||||
>U : Symbol(U, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 25))
|
||||
|
||||
x1 = x2;
|
||||
>x1 : Symbol(x1, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 3))
|
||||
>x2 : Symbol(x2, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 3))
|
||||
|
||||
x2 = x1;
|
||||
>x2 : Symbol(x2, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 1, 3))
|
||||
>x1 : Symbol(x1, Decl(genericAssignmentCompatOfFunctionSignatures1.ts, 0, 3))
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
=== tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts ===
|
||||
var x1 = function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { }
|
||||
>x1 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void
|
||||
>function foo3<T, U extends { a: T; b: string }>(x: T, z: U) { } : <T, U extends { a: T; b: string; }>(x: T, z: U) => void
|
||||
>foo3 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void
|
||||
>T : T
|
||||
>U : U
|
||||
>a : T
|
||||
>T : T
|
||||
>b : string
|
||||
>x : T
|
||||
>T : T
|
||||
>z : U
|
||||
>U : U
|
||||
|
||||
var x2 = function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { }
|
||||
>x2 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void
|
||||
>function foo3<T, U extends { a: T; b: number }>(x: T, z: U) { } : <T, U extends { a: T; b: number; }>(x: T, z: U) => void
|
||||
>foo3 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void
|
||||
>T : T
|
||||
>U : U
|
||||
>a : T
|
||||
>T : T
|
||||
>b : number
|
||||
>x : T
|
||||
>T : T
|
||||
>z : U
|
||||
>U : U
|
||||
|
||||
x1 = x2;
|
||||
>x1 = x2 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void
|
||||
>x1 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void
|
||||
>x2 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void
|
||||
|
||||
x2 = x1;
|
||||
>x2 = x1 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void
|
||||
>x2 : <T, U extends { a: T; b: number; }>(x: T, z: U) => void
|
||||
>x1 : <T, U extends { a: T; b: string; }>(x: T, z: U) => void
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts(3,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts(11,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'.
|
||||
Property 'toDateString' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts (1 errors) ====
|
||||
// Generic call with parameters of T and U, U extends T, no parameter of type U
|
||||
|
||||
function foo<T, U extends T>(t: T) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var u: U;
|
||||
return u;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'Derived' is not a valid type argument because it is not a supertype of candidate 'Derived2'.
|
||||
Property 'y' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(20,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts (1 errors) ====
|
||||
// Generic call with constraints infering type parameter from object member properties
|
||||
|
||||
class Base {
|
||||
@@ -29,8 +28,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj
|
||||
!!! error TS2453: Property 'y' is missing in type 'Derived2'.
|
||||
|
||||
function f2<T extends Base, U extends { x: T; y: T }>(a: U) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var r: T;
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts(12,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts(28,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts(30,24): error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts (3 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts (1 errors) ====
|
||||
// Generic call with constraints infering type parameter from object member properties
|
||||
|
||||
class C {
|
||||
@@ -16,8 +14,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj
|
||||
}
|
||||
|
||||
function foo<T, U extends T>(t: T, t2: U) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return (x: T) => t2;
|
||||
}
|
||||
|
||||
@@ -34,8 +30,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj
|
||||
var r9 = foo(() => { }, () => 1);
|
||||
|
||||
function other<T, U extends T>() {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var r4 = foo(c, d);
|
||||
var r5 = foo<T, U>(c, d); // error
|
||||
~
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts(12,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts(21,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts(22,24): error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts (3 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts (1 errors) ====
|
||||
// Generic call with constraints infering type parameter from object member properties
|
||||
|
||||
class C {
|
||||
@@ -16,8 +14,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj
|
||||
}
|
||||
|
||||
function foo<T, U extends T>(t: T, t2: U) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return (x: T) => t2;
|
||||
}
|
||||
|
||||
@@ -27,8 +23,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj
|
||||
var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no downstream error
|
||||
|
||||
function other<T, U extends T>() {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var r5 = foo<T, U>(c, d); // error
|
||||
~
|
||||
!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'.
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(15,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts(23,9): error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts (2 errors) ====
|
||||
// Type inference infers from indexers in target type, error cases
|
||||
|
||||
function foo<T>(x: T) {
|
||||
return x;
|
||||
}
|
||||
|
||||
function other<T>(arg: T) {
|
||||
var b: {
|
||||
[x: string]: Object;
|
||||
[x: number]: T; // ok, T is a subtype of Object because its apparent type is {}
|
||||
};
|
||||
var r2 = foo(b); // T
|
||||
}
|
||||
|
||||
function other3<T extends U, U extends Date>(arg: T) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b: {
|
||||
[x: string]: Object;
|
||||
[x: number]: T;
|
||||
};
|
||||
var r2 = foo(b);
|
||||
var d = r2[1];
|
||||
var e = r2['1'];
|
||||
var u: U = r2[1]; // ok
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts ===
|
||||
// Type inference infers from indexers in target type, error cases
|
||||
|
||||
function foo<T>(x: T) {
|
||||
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 2, 13))
|
||||
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 2, 16))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 2, 13))
|
||||
|
||||
return x;
|
||||
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 2, 16))
|
||||
}
|
||||
|
||||
function other<T>(arg: T) {
|
||||
>other : Symbol(other, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 4, 1))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 6, 15))
|
||||
>arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 6, 18))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 6, 15))
|
||||
|
||||
var b: {
|
||||
>b : Symbol(b, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 7, 7))
|
||||
|
||||
[x: string]: Object;
|
||||
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 8, 9))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
[x: number]: T; // ok, T is a subtype of Object because its apparent type is {}
|
||||
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 9, 9))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 6, 15))
|
||||
|
||||
};
|
||||
var r2 = foo(b); // T
|
||||
>r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 11, 7))
|
||||
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 0, 0))
|
||||
>b : Symbol(b, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 7, 7))
|
||||
}
|
||||
|
||||
function other3<T extends U, U extends Date>(arg: T) {
|
||||
>other3 : Symbol(other3, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 12, 1))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 16))
|
||||
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 28))
|
||||
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 28))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 45))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 16))
|
||||
|
||||
var b: {
|
||||
>b : Symbol(b, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 15, 7))
|
||||
|
||||
[x: string]: Object;
|
||||
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 16, 9))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
[x: number]: T;
|
||||
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 17, 9))
|
||||
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 16))
|
||||
|
||||
};
|
||||
var r2 = foo(b);
|
||||
>r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 19, 7))
|
||||
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 0, 0))
|
||||
>b : Symbol(b, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 15, 7))
|
||||
|
||||
var d = r2[1];
|
||||
>d : Symbol(d, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 20, 7))
|
||||
>r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 19, 7))
|
||||
|
||||
var e = r2['1'];
|
||||
>e : Symbol(e, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 21, 7))
|
||||
>r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 19, 7))
|
||||
|
||||
var u: U = r2[1]; // ok
|
||||
>u : Symbol(u, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 22, 7))
|
||||
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 14, 28))
|
||||
>r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndIndexersErrors.ts, 19, 7))
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts ===
|
||||
// Type inference infers from indexers in target type, error cases
|
||||
|
||||
function foo<T>(x: T) {
|
||||
>foo : <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
|
||||
return x;
|
||||
>x : T
|
||||
}
|
||||
|
||||
function other<T>(arg: T) {
|
||||
>other : <T>(arg: T) => void
|
||||
>T : T
|
||||
>arg : T
|
||||
>T : T
|
||||
|
||||
var b: {
|
||||
>b : { [x: string]: Object; [x: number]: T; }
|
||||
|
||||
[x: string]: Object;
|
||||
>x : string
|
||||
>Object : Object
|
||||
|
||||
[x: number]: T; // ok, T is a subtype of Object because its apparent type is {}
|
||||
>x : number
|
||||
>T : T
|
||||
|
||||
};
|
||||
var r2 = foo(b); // T
|
||||
>r2 : { [x: string]: Object; [x: number]: T; }
|
||||
>foo(b) : { [x: string]: Object; [x: number]: T; }
|
||||
>foo : <T>(x: T) => T
|
||||
>b : { [x: string]: Object; [x: number]: T; }
|
||||
}
|
||||
|
||||
function other3<T extends U, U extends Date>(arg: T) {
|
||||
>other3 : <T extends U, U extends Date>(arg: T) => void
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Date : Date
|
||||
>arg : T
|
||||
>T : T
|
||||
|
||||
var b: {
|
||||
>b : { [x: string]: Object; [x: number]: T; }
|
||||
|
||||
[x: string]: Object;
|
||||
>x : string
|
||||
>Object : Object
|
||||
|
||||
[x: number]: T;
|
||||
>x : number
|
||||
>T : T
|
||||
|
||||
};
|
||||
var r2 = foo(b);
|
||||
>r2 : { [x: string]: Object; [x: number]: T; }
|
||||
>foo(b) : { [x: string]: Object; [x: number]: T; }
|
||||
>foo : <T>(x: T) => T
|
||||
>b : { [x: string]: Object; [x: number]: T; }
|
||||
|
||||
var d = r2[1];
|
||||
>d : T
|
||||
>r2[1] : T
|
||||
>r2 : { [x: string]: Object; [x: number]: T; }
|
||||
>1 : number
|
||||
|
||||
var e = r2['1'];
|
||||
>e : Object
|
||||
>r2['1'] : Object
|
||||
>r2 : { [x: string]: Object; [x: number]: T; }
|
||||
>'1' : string
|
||||
|
||||
var u: U = r2[1]; // ok
|
||||
>u : U
|
||||
>U : U
|
||||
>r2[1] : T
|
||||
>r2 : { [x: string]: Object; [x: number]: T; }
|
||||
>1 : number
|
||||
}
|
||||
@@ -1,17 +1,10 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2322: Type 'number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(7,37): error TS2322: Type 'U' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2322: Type 'U' is not assignable to type 'V'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,31): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(9,50): error TS2322: Type 'V' is not assignable to type 'U'.
|
||||
Type 'T' is not assignable to type 'V'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts (11 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts (3 errors) ====
|
||||
// Generic typed parameters with initializers
|
||||
|
||||
function foo<T>(x: T = null) { return x; } // ok
|
||||
@@ -20,26 +13,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericC
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'T'.
|
||||
function foo4<T, U extends T>(x: T, y: U = x) { } // error
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
function foo5<T, U extends T>(x: U, y: T = x) { } // ok
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'U' is not assignable to type 'T'.
|
||||
function foo6<T, U extends T, V extends U>(x: T, y: U, z: V = y) { } // error
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'U' is not assignable to type 'V'.
|
||||
function foo7<T, U extends T, V extends U>(x: V, y: U = x) { } // should be ok
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'V' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'V'.
|
||||
function foo7<T, U extends T, V extends U>(x: V, y: U = x) { } // should be ok
|
||||
@@ -1,18 +1,15 @@
|
||||
tests/cases/compiler/genericConstraint2.ts(5,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericConstraint2.ts(11,7): error TS2420: Class 'ComparableString' incorrectly implements interface 'Comparable<string>'.
|
||||
Property 'comparer' is missing in type 'ComparableString'.
|
||||
tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'ComparableString' does not satisfy the constraint 'Comparable<any>'.
|
||||
tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'ComparableString' does not satisfy the constraint 'Comparable<ComparableString>'.
|
||||
Property 'comparer' is missing in type 'ComparableString'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericConstraint2.ts (3 errors) ====
|
||||
==== tests/cases/compiler/genericConstraint2.ts (2 errors) ====
|
||||
interface Comparable<T> {
|
||||
comparer(other: T): number;
|
||||
}
|
||||
|
||||
function compare<T extends Comparable<T>>(x: T, y: T): number {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
if (x == null) return y == null ? 0 : -1;
|
||||
if (y == null) return 1;
|
||||
return x.comparer(y);
|
||||
@@ -33,5 +30,5 @@ tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'Comparabl
|
||||
var b = new ComparableString("b");
|
||||
var c = compare<ComparableString>(a, b);
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2344: Type 'ComparableString' does not satisfy the constraint 'Comparable<any>'.
|
||||
!!! error TS2344: Type 'ComparableString' does not satisfy the constraint 'Comparable<ComparableString>'.
|
||||
!!! error TS2344: Property 'comparer' is missing in type 'ComparableString'.
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/compiler/genericConstraint3.ts(2,16): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericConstraint3.ts (1 errors) ====
|
||||
interface C<P> { x: P; }
|
||||
interface A<T, U extends C<T>> { x: U; }
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
interface B extends A<{}, { x: {} }> { } // Should not produce an error
|
||||
21
tests/baselines/reference/genericConstraint3.symbols
Normal file
21
tests/baselines/reference/genericConstraint3.symbols
Normal file
@@ -0,0 +1,21 @@
|
||||
=== tests/cases/compiler/genericConstraint3.ts ===
|
||||
interface C<P> { x: P; }
|
||||
>C : Symbol(C, Decl(genericConstraint3.ts, 0, 0))
|
||||
>P : Symbol(P, Decl(genericConstraint3.ts, 0, 12))
|
||||
>x : Symbol(x, Decl(genericConstraint3.ts, 0, 16))
|
||||
>P : Symbol(P, Decl(genericConstraint3.ts, 0, 12))
|
||||
|
||||
interface A<T, U extends C<T>> { x: U; }
|
||||
>A : Symbol(A, Decl(genericConstraint3.ts, 0, 24))
|
||||
>T : Symbol(T, Decl(genericConstraint3.ts, 1, 12))
|
||||
>U : Symbol(U, Decl(genericConstraint3.ts, 1, 14))
|
||||
>C : Symbol(C, Decl(genericConstraint3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(genericConstraint3.ts, 1, 12))
|
||||
>x : Symbol(x, Decl(genericConstraint3.ts, 1, 32))
|
||||
>U : Symbol(U, Decl(genericConstraint3.ts, 1, 14))
|
||||
|
||||
interface B extends A<{}, { x: {} }> { } // Should not produce an error
|
||||
>B : Symbol(B, Decl(genericConstraint3.ts, 1, 40))
|
||||
>A : Symbol(A, Decl(genericConstraint3.ts, 0, 24))
|
||||
>x : Symbol(x, Decl(genericConstraint3.ts, 2, 27))
|
||||
|
||||
21
tests/baselines/reference/genericConstraint3.types
Normal file
21
tests/baselines/reference/genericConstraint3.types
Normal file
@@ -0,0 +1,21 @@
|
||||
=== tests/cases/compiler/genericConstraint3.ts ===
|
||||
interface C<P> { x: P; }
|
||||
>C : C<P>
|
||||
>P : P
|
||||
>x : P
|
||||
>P : P
|
||||
|
||||
interface A<T, U extends C<T>> { x: U; }
|
||||
>A : A<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>C : C<P>
|
||||
>T : T
|
||||
>x : U
|
||||
>U : U
|
||||
|
||||
interface B extends A<{}, { x: {} }> { } // Should not produce an error
|
||||
>B : B
|
||||
>A : A<T, U>
|
||||
>x : {}
|
||||
|
||||
@@ -1,45 +1,30 @@
|
||||
tests/cases/compiler/genericMemberFunction.ts(2,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericMemberFunction.ts(7,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericMemberFunction.ts(10,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericMemberFunction.ts(15,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericMemberFunction.ts(16,5): error TS2304: Cannot find name 'a'.
|
||||
tests/cases/compiler/genericMemberFunction.ts(17,5): error TS2304: Cannot find name 'removedFiles'.
|
||||
tests/cases/compiler/genericMemberFunction.ts(17,30): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericMemberFunction.ts(18,12): error TS2339: Property 'removeFile' does not exist on type 'BuildResult<A, B, C>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericMemberFunction.ts (8 errors) ====
|
||||
==== tests/cases/compiler/genericMemberFunction.ts (3 errors) ====
|
||||
export class BuildError<A, B, C>{
|
||||
public parent<A, B extends A, C>(): FileWithErrors<A, B, C> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
export class FileWithErrors<A, B, C>{
|
||||
public errors<A, B extends A, C>(): BuildError<A, B, C>[] {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return undefined;
|
||||
}
|
||||
public parent<A, B extends A, C>(): BuildResult<A, B, C> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
export class BuildResult<A, B, C>{
|
||||
public merge<A, B extends A, C>(other: BuildResult<A, B, C>): void {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
a.b.c.d.e.f.g = 0;
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'a'.
|
||||
removedFiles.forEach(<A, B extends A, C>(each: FileWithErrors<A, B, C>) => {
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'removedFiles'.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
this.removeFile(each);
|
||||
~~~~~~~~~~
|
||||
!!! error TS2339: Property 'removeFile' does not exist on type 'BuildResult<A, B, C>'.
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts(1,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts(3,19): error TS2304: Cannot find name 'T'.
|
||||
tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts(4,14): error TS2304: Cannot find name 'T'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts (3 errors) ====
|
||||
==== tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts (2 errors) ====
|
||||
function foo<T extends U, U>(y: T, z: U) { return y; }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
module foo {
|
||||
export var x: T;
|
||||
~
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts(4,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts (1 errors) ====
|
||||
// instantiating a derived type can cause an infinitely expanding type reference to be generated
|
||||
// which could be used in an assignment check for constraint satisfaction
|
||||
|
||||
interface AA<T extends AA<T>> // now an error due to referencing type parameter in constraint
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
{
|
||||
x: T
|
||||
}
|
||||
|
||||
interface BB extends AA<AA<BB>>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts ===
|
||||
// instantiating a derived type can cause an infinitely expanding type reference to be generated
|
||||
// which could be used in an assignment check for constraint satisfaction
|
||||
|
||||
interface AA<T extends AA<T>> // now an error due to referencing type parameter in constraint
|
||||
>AA : Symbol(AA, Decl(infiniteExpansionThroughInstantiation2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(infiniteExpansionThroughInstantiation2.ts, 3, 13))
|
||||
>AA : Symbol(AA, Decl(infiniteExpansionThroughInstantiation2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(infiniteExpansionThroughInstantiation2.ts, 3, 13))
|
||||
{
|
||||
x: T
|
||||
>x : Symbol(x, Decl(infiniteExpansionThroughInstantiation2.ts, 4, 1))
|
||||
>T : Symbol(T, Decl(infiniteExpansionThroughInstantiation2.ts, 3, 13))
|
||||
}
|
||||
|
||||
interface BB extends AA<AA<BB>>
|
||||
>BB : Symbol(BB, Decl(infiniteExpansionThroughInstantiation2.ts, 6, 1))
|
||||
>AA : Symbol(AA, Decl(infiniteExpansionThroughInstantiation2.ts, 0, 0))
|
||||
>AA : Symbol(AA, Decl(infiniteExpansionThroughInstantiation2.ts, 0, 0))
|
||||
>BB : Symbol(BB, Decl(infiniteExpansionThroughInstantiation2.ts, 6, 1))
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts ===
|
||||
// instantiating a derived type can cause an infinitely expanding type reference to be generated
|
||||
// which could be used in an assignment check for constraint satisfaction
|
||||
|
||||
interface AA<T extends AA<T>> // now an error due to referencing type parameter in constraint
|
||||
>AA : AA<T>
|
||||
>T : T
|
||||
>AA : AA<T>
|
||||
>T : T
|
||||
{
|
||||
x: T
|
||||
>x : T
|
||||
>T : T
|
||||
}
|
||||
|
||||
interface BB extends AA<AA<BB>>
|
||||
>BB : BB
|
||||
>AA : AA<T>
|
||||
>AA : AA<T>
|
||||
>BB : BB
|
||||
{
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(1,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(1,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(2,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts(2,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts (4 errors) ====
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
@@ -0,0 +1,30 @@
|
||||
=== tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts ===
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
>A : Symbol(A, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 12))
|
||||
>A : Symbol(A, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 12))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 30))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 30))
|
||||
>A : Symbol(A, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 12))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 30))
|
||||
|
||||
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
|
||||
>B : Symbol(B, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 53))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 12))
|
||||
>B : Symbol(B, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 53))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 12))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 30))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 30))
|
||||
>B : Symbol(B, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 53))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 12))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 30))
|
||||
>A : Symbol(A, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 53))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 12))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 30))
|
||||
>B : Symbol(B, Decl(instantiateConstraintsToTypeArguments2.ts, 0, 53))
|
||||
>T : Symbol(T, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 12))
|
||||
>S : Symbol(S, Decl(instantiateConstraintsToTypeArguments2.ts, 1, 30))
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
=== tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts ===
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>S : S
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
|
||||
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>S : S
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>A : A<T, S>
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
tests/cases/compiler/instantiatedBaseTypeConstraints.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/instantiatedBaseTypeConstraints.ts (1 errors) ====
|
||||
interface Foo<T extends Foo<T, C>, C> {
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(bar: C): void;
|
||||
}
|
||||
|
||||
class Bar implements Foo<Bar, string> {
|
||||
foo(bar: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
=== tests/cases/compiler/instantiatedBaseTypeConstraints.ts ===
|
||||
interface Foo<T extends Foo<T, C>, C> {
|
||||
>Foo : Symbol(Foo, Decl(instantiatedBaseTypeConstraints.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiatedBaseTypeConstraints.ts, 0, 14))
|
||||
>Foo : Symbol(Foo, Decl(instantiatedBaseTypeConstraints.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiatedBaseTypeConstraints.ts, 0, 14))
|
||||
>C : Symbol(C, Decl(instantiatedBaseTypeConstraints.ts, 0, 34))
|
||||
>C : Symbol(C, Decl(instantiatedBaseTypeConstraints.ts, 0, 34))
|
||||
|
||||
foo(bar: C): void;
|
||||
>foo : Symbol(foo, Decl(instantiatedBaseTypeConstraints.ts, 0, 39))
|
||||
>bar : Symbol(bar, Decl(instantiatedBaseTypeConstraints.ts, 1, 6))
|
||||
>C : Symbol(C, Decl(instantiatedBaseTypeConstraints.ts, 0, 34))
|
||||
}
|
||||
|
||||
class Bar implements Foo<Bar, string> {
|
||||
>Bar : Symbol(Bar, Decl(instantiatedBaseTypeConstraints.ts, 2, 1))
|
||||
>Foo : Symbol(Foo, Decl(instantiatedBaseTypeConstraints.ts, 0, 0))
|
||||
>Bar : Symbol(Bar, Decl(instantiatedBaseTypeConstraints.ts, 2, 1))
|
||||
|
||||
foo(bar: string): void {
|
||||
>foo : Symbol(foo, Decl(instantiatedBaseTypeConstraints.ts, 4, 39))
|
||||
>bar : Symbol(bar, Decl(instantiatedBaseTypeConstraints.ts, 5, 6))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
=== tests/cases/compiler/instantiatedBaseTypeConstraints.ts ===
|
||||
interface Foo<T extends Foo<T, C>, C> {
|
||||
>Foo : Foo<T, C>
|
||||
>T : T
|
||||
>Foo : Foo<T, C>
|
||||
>T : T
|
||||
>C : C
|
||||
>C : C
|
||||
|
||||
foo(bar: C): void;
|
||||
>foo : (bar: C) => void
|
||||
>bar : C
|
||||
>C : C
|
||||
}
|
||||
|
||||
class Bar implements Foo<Bar, string> {
|
||||
>Bar : Bar
|
||||
>Foo : Foo<T, C>
|
||||
>Bar : Bar
|
||||
|
||||
foo(bar: string): void {
|
||||
>foo : (bar: string) => void
|
||||
>bar : string
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
tests/cases/compiler/instantiatedBaseTypeConstraints2.ts(1,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/instantiatedBaseTypeConstraints2.ts(1,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/instantiatedBaseTypeConstraints2.ts (2 errors) ====
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
interface B<U> extends A<B<U>, B<U>> { }
|
||||
@@ -0,0 +1,21 @@
|
||||
=== tests/cases/compiler/instantiatedBaseTypeConstraints2.ts ===
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
>A : Symbol(A, Decl(instantiatedBaseTypeConstraints2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiatedBaseTypeConstraints2.ts, 0, 12))
|
||||
>A : Symbol(A, Decl(instantiatedBaseTypeConstraints2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiatedBaseTypeConstraints2.ts, 0, 12))
|
||||
>S : Symbol(S, Decl(instantiatedBaseTypeConstraints2.ts, 0, 30))
|
||||
>S : Symbol(S, Decl(instantiatedBaseTypeConstraints2.ts, 0, 30))
|
||||
>A : Symbol(A, Decl(instantiatedBaseTypeConstraints2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(instantiatedBaseTypeConstraints2.ts, 0, 12))
|
||||
>S : Symbol(S, Decl(instantiatedBaseTypeConstraints2.ts, 0, 30))
|
||||
|
||||
interface B<U> extends A<B<U>, B<U>> { }
|
||||
>B : Symbol(B, Decl(instantiatedBaseTypeConstraints2.ts, 0, 53))
|
||||
>U : Symbol(U, Decl(instantiatedBaseTypeConstraints2.ts, 1, 12))
|
||||
>A : Symbol(A, Decl(instantiatedBaseTypeConstraints2.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(instantiatedBaseTypeConstraints2.ts, 0, 53))
|
||||
>U : Symbol(U, Decl(instantiatedBaseTypeConstraints2.ts, 1, 12))
|
||||
>B : Symbol(B, Decl(instantiatedBaseTypeConstraints2.ts, 0, 53))
|
||||
>U : Symbol(U, Decl(instantiatedBaseTypeConstraints2.ts, 1, 12))
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
=== tests/cases/compiler/instantiatedBaseTypeConstraints2.ts ===
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>S : S
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
|
||||
interface B<U> extends A<B<U>, B<U>> { }
|
||||
>B : B<U>
|
||||
>U : U
|
||||
>A : A<T, S>
|
||||
>B : B<U>
|
||||
>U : U
|
||||
>B : B<U>
|
||||
>U : U
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(3,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(7,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(11,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(16,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(18,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
@@ -11,11 +9,9 @@ tests/cases/compiler/interfaceWithMultipleDeclarations.ts(20,11): error TS2428:
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(22,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(24,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(29,11): error TS2428: All declarations of an interface must have identical type parameters.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(34,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(36,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/interfaceWithMultipleDeclarations.ts (15 errors) ====
|
||||
==== tests/cases/compiler/interfaceWithMultipleDeclarations.ts (11 errors) ====
|
||||
interface I1<V> {
|
||||
}
|
||||
interface I1<S> { // Name mismatch
|
||||
@@ -25,8 +21,6 @@ tests/cases/compiler/interfaceWithMultipleDeclarations.ts(36,14): error TS2313:
|
||||
interface I1<T, U extends T> { // Length mismatch
|
||||
~~
|
||||
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
interface I1<V extends string> { // constraint present
|
||||
~~
|
||||
@@ -35,8 +29,6 @@ tests/cases/compiler/interfaceWithMultipleDeclarations.ts(36,14): error TS2313:
|
||||
interface I1<V, X extends V> { // Length mismatch
|
||||
~~
|
||||
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
interface I1 { // Length mismatch
|
||||
~~
|
||||
@@ -76,10 +68,6 @@ tests/cases/compiler/interfaceWithMultipleDeclarations.ts(36,14): error TS2313:
|
||||
class Foo<T> {
|
||||
}
|
||||
interface I4<T extends Foo<T>> {
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
interface I4<T extends Foo<T>> { // Should not be error
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
tests/cases/compiler/invalidConstraint1.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/invalidConstraint1.ts(4,11): error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: string; }'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/invalidConstraint1.ts (1 errors) ====
|
||||
function f<T, U extends { a: T }>() {
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
return undefined;
|
||||
}
|
||||
f<string, { a: number }>(); // should error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: string; }'.
|
||||
!!! error TS2344: Types of property 'a' are incompatible.
|
||||
!!! error TS2344: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
tests/cases/compiler/matchingOfObjectLiteralConstraints.ts(1,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/matchingOfObjectLiteralConstraints.ts (1 errors) ====
|
||||
function foo2<T, U extends { y: T; }>(x: U, z: T) { }
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo2({ y: "foo" }, "foo");
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/compiler/matchingOfObjectLiteralConstraints.ts ===
|
||||
function foo2<T, U extends { y: T; }>(x: U, z: T) { }
|
||||
>foo2 : Symbol(foo2, Decl(matchingOfObjectLiteralConstraints.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(matchingOfObjectLiteralConstraints.ts, 0, 14))
|
||||
>U : Symbol(U, Decl(matchingOfObjectLiteralConstraints.ts, 0, 16))
|
||||
>y : Symbol(y, Decl(matchingOfObjectLiteralConstraints.ts, 0, 28))
|
||||
>T : Symbol(T, Decl(matchingOfObjectLiteralConstraints.ts, 0, 14))
|
||||
>x : Symbol(x, Decl(matchingOfObjectLiteralConstraints.ts, 0, 38))
|
||||
>U : Symbol(U, Decl(matchingOfObjectLiteralConstraints.ts, 0, 16))
|
||||
>z : Symbol(z, Decl(matchingOfObjectLiteralConstraints.ts, 0, 43))
|
||||
>T : Symbol(T, Decl(matchingOfObjectLiteralConstraints.ts, 0, 14))
|
||||
|
||||
foo2({ y: "foo" }, "foo");
|
||||
>foo2 : Symbol(foo2, Decl(matchingOfObjectLiteralConstraints.ts, 0, 0))
|
||||
>y : Symbol(y, Decl(matchingOfObjectLiteralConstraints.ts, 1, 6))
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
=== tests/cases/compiler/matchingOfObjectLiteralConstraints.ts ===
|
||||
function foo2<T, U extends { y: T; }>(x: U, z: T) { }
|
||||
>foo2 : <T, U extends { y: T; }>(x: U, z: T) => void
|
||||
>T : T
|
||||
>U : U
|
||||
>y : T
|
||||
>T : T
|
||||
>x : U
|
||||
>U : U
|
||||
>z : T
|
||||
>T : T
|
||||
|
||||
foo2({ y: "foo" }, "foo");
|
||||
>foo2({ y: "foo" }, "foo") : void
|
||||
>foo2 : <T, U extends { y: T; }>(x: U, z: T) => void
|
||||
>{ y: "foo" } : { y: string; }
|
||||
>y : string
|
||||
>"foo" : string
|
||||
>"foo" : string
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
tests/cases/compiler/maxConstraints.ts(5,6): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<any>'.
|
||||
Property 'compareTo' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/maxConstraints.ts (2 errors) ====
|
||||
==== tests/cases/compiler/maxConstraints.ts (1 errors) ====
|
||||
interface Comparable<T> {
|
||||
compareTo(other: T): number;
|
||||
}
|
||||
interface Comparer {
|
||||
<T extends Comparable<T>>(x: T, y: T): T;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y };
|
||||
var maxResult = max2(1, 2);
|
||||
|
||||
@@ -8,15 +8,11 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec
|
||||
Type 'MyList<number>' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(31,5): error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
Type 'List<number>' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(41,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(42,5): error TS2322: Type 'U' is not assignable to type 'T'.
|
||||
Type 'MyList<number>' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(43,5): error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(48,5): error TS2322: Type 'T' is not assignable to type 'List<number>'.
|
||||
tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts(50,5): error TS2322: Type 'T' is not assignable to type 'MyList<number>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts (9 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts (5 errors) ====
|
||||
// Types with infinitely expanding recursive types are type checked nominally
|
||||
|
||||
class List<T> {
|
||||
@@ -72,25 +68,17 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec
|
||||
}
|
||||
|
||||
function foo2<T extends U, U extends MyList<number>>(t: T, u: U) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
t = u; // error
|
||||
~
|
||||
!!! error TS2322: Type 'U' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'MyList<number>' is not assignable to type 'T'.
|
||||
u = t; // was error, ok after constraint made illegal, doesn't matter
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
|
||||
var a: List<number>;
|
||||
var b: MyList<number>;
|
||||
|
||||
a = t; // error
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'List<number>'.
|
||||
a = u; // error
|
||||
b = t; // ok
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'MyList<number>'.
|
||||
b = u; // ok
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts(2,8): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts (1 errors) ====
|
||||
interface A {
|
||||
<T extends {
|
||||
~~~~~~~~~~~
|
||||
<S extends A>(x: T, y: S): void
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}>(x: T, y: T): void
|
||||
~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
interface B {
|
||||
<U extends B>(x: U, y: U): void
|
||||
}
|
||||
|
||||
// ok, not considered identical because the steps of contextual signature instantiation create fresh type parameters
|
||||
function foo(x: A);
|
||||
function foo(x: B); // error after constraints above made illegal
|
||||
function foo(x: any) { }
|
||||
@@ -0,0 +1,49 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts ===
|
||||
interface A {
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithComplexConstraints.ts, 0, 0))
|
||||
|
||||
<T extends {
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
|
||||
|
||||
<S extends A>(x: T, y: S): void
|
||||
>S : Symbol(S, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 13))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithComplexConstraints.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 26))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 31))
|
||||
>S : Symbol(S, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 13))
|
||||
|
||||
}>(x: T, y: T): void
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 3, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithComplexConstraints.ts, 3, 14))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
|
||||
}
|
||||
|
||||
interface B {
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithComplexConstraints.ts, 4, 1))
|
||||
|
||||
<U extends B>(x: U, y: U): void
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 7))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithComplexConstraints.ts, 4, 1))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 7))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 25))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 7))
|
||||
}
|
||||
|
||||
// ok, not considered identical because the steps of contextual signature instantiation create fresh type parameters
|
||||
function foo(x: A);
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithComplexConstraints.ts, 8, 1), Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 19), Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 19))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 13))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithComplexConstraints.ts, 0, 0))
|
||||
|
||||
function foo(x: B); // error after constraints above made illegal
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithComplexConstraints.ts, 8, 1), Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 19), Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 19))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 13))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithComplexConstraints.ts, 4, 1))
|
||||
|
||||
function foo(x: any) { }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithComplexConstraints.ts, 8, 1), Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 19), Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 19))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 13, 13))
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts ===
|
||||
interface A {
|
||||
>A : A
|
||||
|
||||
<T extends {
|
||||
>T : T
|
||||
|
||||
<S extends A>(x: T, y: S): void
|
||||
>S : S
|
||||
>A : A
|
||||
>x : T
|
||||
>T : T
|
||||
>y : S
|
||||
>S : S
|
||||
|
||||
}>(x: T, y: T): void
|
||||
>x : T
|
||||
>T : T
|
||||
>y : T
|
||||
>T : T
|
||||
}
|
||||
|
||||
interface B {
|
||||
>B : B
|
||||
|
||||
<U extends B>(x: U, y: U): void
|
||||
>U : U
|
||||
>B : B
|
||||
>x : U
|
||||
>U : U
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
// ok, not considered identical because the steps of contextual signature instantiation create fresh type parameters
|
||||
function foo(x: A);
|
||||
>foo : { (x: A): any; (x: B): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo(x: B); // error after constraints above made illegal
|
||||
>foo : { (x: A): any; (x: B): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo(x: any) { }
|
||||
>foo : { (x: A): any; (x: B): any; }
|
||||
>x : any
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(6,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(9,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(13,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(17,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(21,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(26,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(29,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts(30,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts (8 errors) ====
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class A {
|
||||
foo<T extends U, U extends Date>(x: T, y: U): string { return null; }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Array<number>> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string { return null; }
|
||||
}
|
||||
|
||||
class C<T extends U, U extends String> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string { return null; }
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Number> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string { return null; }
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Number> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string;
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
foo<T extends U, U extends Boolean>(x: T, y: U): string;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
var a: { foo<T extends U, U extends Array<string>>(x: T, y: U): string }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b = { foo<T extends U, U extends RegExp>(x: T, y: U) { return ''; } };
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
function foo1(x: A);
|
||||
function foo1(x: A); // error
|
||||
function foo1(x: any) { }
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>);
|
||||
function foo1b(x: B<Array<number>, Array<number>>); // error
|
||||
function foo1b(x: any) { }
|
||||
|
||||
function foo1c(x: C<String, String>);
|
||||
function foo1c(x: C<String, String>); // error
|
||||
function foo1c(x: any) { }
|
||||
|
||||
function foo2(x: I<Number, Number>);
|
||||
function foo2(x: I<Number, Number>); // error
|
||||
function foo2(x: any) { }
|
||||
|
||||
function foo3(x: typeof a);
|
||||
function foo3(x: typeof a); // error
|
||||
function foo3(x: any) { }
|
||||
|
||||
function foo4(x: typeof b);
|
||||
function foo4(x: typeof b); // error
|
||||
function foo4(x: any) { }
|
||||
|
||||
function foo5(x: A);
|
||||
function foo5(x: B<Array<number>, Array<number>>); // ok
|
||||
function foo5(x: any) { }
|
||||
|
||||
function foo5b(x: A);
|
||||
function foo5b(x: C<String, String>); // ok
|
||||
function foo5b(x: any) { }
|
||||
|
||||
function foo5c(x: C<String, String>);
|
||||
function foo5c(x: D<Number, Number>); // ok
|
||||
function foo5c(x: any) { }
|
||||
|
||||
function foo6c(x: C<String, String>);
|
||||
function foo6c(x: D<any, Number>); // error, "any" does not satisfy the constraint
|
||||
function foo6c(x: any) { }
|
||||
|
||||
function foo6(x: A);
|
||||
function foo6(x: I<Number, Number>); // ok
|
||||
function foo6(x: any) { }
|
||||
|
||||
function foo7(x: A);
|
||||
function foo7(x: typeof a); // ok
|
||||
function foo7(x: any) { }
|
||||
|
||||
function foo8(x: B<Array<number>, Array<number>>);
|
||||
function foo8(x: I<Number, Number>); // ok
|
||||
function foo8(x: any) { }
|
||||
|
||||
function foo9(x: B<Array<number>, Array<number>>);
|
||||
function foo9(x: C<String, String>); // ok
|
||||
function foo9(x: any) { }
|
||||
|
||||
function foo10(x: B<Array<number>, Array<number>>);
|
||||
function foo10(x: typeof a); // ok
|
||||
function foo10(x: any) { }
|
||||
|
||||
function foo11(x: B<Array<number>, Array<number>>);
|
||||
function foo11(x: typeof b); // ok
|
||||
function foo11(x: any) { }
|
||||
|
||||
function foo12(x: I<Number, Number>);
|
||||
function foo12(x: C<String, String>); // ok
|
||||
function foo12(x: any) { }
|
||||
|
||||
function foo12b(x: I2);
|
||||
function foo12b(x: C<String, String>); // ok
|
||||
function foo12b(x: any) { }
|
||||
|
||||
function foo13(x: I<Number, Number>);
|
||||
function foo13(x: typeof a); // ok
|
||||
function foo13(x: any) { }
|
||||
|
||||
function foo14(x: I<Number, Number>);
|
||||
function foo14(x: typeof b); // ok
|
||||
function foo14(x: any) { }
|
||||
|
||||
function foo15(x: I2);
|
||||
function foo15(x: C<String, String>); // ok
|
||||
function foo15(x: any) { }
|
||||
@@ -0,0 +1,462 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class A {
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
foo<T extends U, U extends Date>(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 4, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 20))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 37))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 42))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 5, 20))
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Array<number>> {
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 8, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 8, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 8, 20))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 8, 47))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 9, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 8, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 9, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 8, 20))
|
||||
}
|
||||
|
||||
class C<T extends U, U extends String> {
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 20))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 40))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 13, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 13, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 12, 20))
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Number> {
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 16, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 16, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 16, 20))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 16, 40))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 17, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 16, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 17, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 16, 20))
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Number> {
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 20, 12))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 20, 24))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 20, 24))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo(x: T, y: U): string;
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 20, 44))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 21, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 20, 12))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 21, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 20, 24))
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 22, 1))
|
||||
|
||||
foo<T extends U, U extends Boolean>(x: T, y: U): string;
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 24, 14))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 20))
|
||||
>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 40))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 45))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 25, 20))
|
||||
}
|
||||
|
||||
var a: { foo<T extends U, U extends Array<string>>(x: T, y: U): string }
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 3))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 25))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 25))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 51))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 13))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 56))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 25))
|
||||
|
||||
var b = { foo<T extends U, U extends RegExp>(x: T, y: U) { return ''; } };
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 3))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 14))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 26))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 26))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 45))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 14))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 50))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 26))
|
||||
|
||||
function foo1(x: A);
|
||||
>foo1 : Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 74), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 31, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 32, 20))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 31, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
function foo1(x: A); // error
|
||||
>foo1 : Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 74), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 31, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 32, 20))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 32, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
function foo1(x: any) { }
|
||||
>foo1 : Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 74), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 31, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 32, 20))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 33, 14))
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>);
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 33, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 35, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 36, 51))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 35, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>); // error
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 33, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 35, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 36, 51))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 36, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 33, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 35, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 36, 51))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 15))
|
||||
|
||||
function foo1c(x: C<String, String>);
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1c(x: C<String, String>); // error
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 39, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 40, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 41, 15))
|
||||
|
||||
function foo2(x: I<Number, Number>);
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 41, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 43, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 44, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 43, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo2(x: I<Number, Number>); // error
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 41, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 43, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 44, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 44, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 41, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 43, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 44, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 45, 14))
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 47, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 48, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 47, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 3))
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 47, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 48, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 48, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 3))
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 47, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 48, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 49, 14))
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 51, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 52, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 51, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 3))
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 51, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 52, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 52, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 3))
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 51, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 52, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 53, 14))
|
||||
|
||||
function foo5(x: A);
|
||||
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 55, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 56, 50))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 55, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
function foo5(x: B<Array<number>, Array<number>>); // ok
|
||||
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 55, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 56, 50))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 56, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo5(x: any) { }
|
||||
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 55, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 56, 50))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 57, 14))
|
||||
|
||||
function foo5b(x: A);
|
||||
>foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 59, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 59, 15))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
function foo5b(x: C<String, String>); // ok
|
||||
>foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 59, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo5b(x: any) { }
|
||||
>foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 59, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 60, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 61, 15))
|
||||
|
||||
function foo5c(x: C<String, String>);
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 61, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 64, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo5c(x: D<Number, Number>); // ok
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 61, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 64, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 64, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 61, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 63, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 64, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 65, 15))
|
||||
|
||||
function foo6c(x: C<String, String>);
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 68, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo6c(x: D<any, Number>); // error, "any" does not satisfy the constraint
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 68, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 68, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 67, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 68, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 69, 15))
|
||||
|
||||
function foo6(x: A);
|
||||
>foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 71, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 72, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 71, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
function foo6(x: I<Number, Number>); // ok
|
||||
>foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 71, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 72, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 72, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo6(x: any) { }
|
||||
>foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 71, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 72, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 73, 14))
|
||||
|
||||
function foo7(x: A);
|
||||
>foo7 : Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 75, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 76, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 75, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
|
||||
function foo7(x: typeof a); // ok
|
||||
>foo7 : Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 75, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 76, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 76, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 3))
|
||||
|
||||
function foo7(x: any) { }
|
||||
>foo7 : Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 75, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 76, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 77, 14))
|
||||
|
||||
function foo8(x: B<Array<number>, Array<number>>);
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 77, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 79, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 80, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 79, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo8(x: I<Number, Number>); // ok
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 77, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 79, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 80, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 80, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 77, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 79, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 80, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 81, 14))
|
||||
|
||||
function foo9(x: B<Array<number>, Array<number>>);
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 81, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 83, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 83, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo9(x: C<String, String>); // ok
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 81, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 83, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 14))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 81, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 83, 50), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 84, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 85, 14))
|
||||
|
||||
function foo10(x: B<Array<number>, Array<number>>);
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 85, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 87, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 88, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 87, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 85, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 87, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 88, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 88, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 3))
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 85, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 87, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 88, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 89, 15))
|
||||
|
||||
function foo11(x: B<Array<number>, Array<number>>);
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 89, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 91, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 92, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 91, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 89, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 91, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 92, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 92, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 3))
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 89, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 91, 51), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 92, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 93, 15))
|
||||
|
||||
function foo12(x: I<Number, Number>);
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 95, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo12(x: C<String, String>); // ok
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 96, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 97, 15))
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 99, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 38))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 99, 16))
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 22, 1))
|
||||
|
||||
function foo12b(x: C<String, String>); // ok
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 99, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 38))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 16))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 99, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 100, 38))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 101, 16))
|
||||
|
||||
function foo13(x: I<Number, Number>);
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 101, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 103, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 104, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 103, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 101, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 103, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 104, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 104, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 28, 3))
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 101, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 103, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 104, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 105, 15))
|
||||
|
||||
function foo14(x: I<Number, Number>);
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 105, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 107, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 108, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 107, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 105, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 107, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 108, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 108, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 29, 3))
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 105, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 107, 37), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 108, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 109, 15))
|
||||
|
||||
function foo15(x: I2);
|
||||
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 109, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 111, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 111, 15))
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 22, 1))
|
||||
|
||||
function foo15(x: C<String, String>); // ok
|
||||
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 109, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 111, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo15(x: any) { }
|
||||
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 109, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 111, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 112, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts, 113, 15))
|
||||
|
||||
@@ -0,0 +1,468 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
foo<T extends U, U extends Date>(x: T, y: U): string { return null; }
|
||||
>foo : <T extends U, U extends Date>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Date : Date
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Array<number>> {
|
||||
>B : B<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Array : T[]
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class C<T extends U, U extends String> {
|
||||
>C : C<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>String : String
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Number> {
|
||||
>D : D<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Number : Number
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Number> {
|
||||
>I : I<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Number : Number
|
||||
|
||||
foo(x: T, y: U): string;
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : I2
|
||||
|
||||
foo<T extends U, U extends Boolean>(x: T, y: U): string;
|
||||
>foo : <T extends U, U extends Boolean>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Boolean : Boolean
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
var a: { foo<T extends U, U extends Array<string>>(x: T, y: U): string }
|
||||
>a : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
>foo : <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Array : T[]
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
|
||||
var b = { foo<T extends U, U extends RegExp>(x: T, y: U) { return ''; } };
|
||||
>b : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>{ foo<T extends U, U extends RegExp>(x: T, y: U) { return ''; } } : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>foo : <T extends U, U extends RegExp>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>RegExp : RegExp
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>'' : string
|
||||
|
||||
function foo1(x: A);
|
||||
>foo1 : { (x: A): any; (x: A): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo1(x: A); // error
|
||||
>foo1 : { (x: A): any; (x: A): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo1(x: any) { }
|
||||
>foo1 : { (x: A): any; (x: A): any; }
|
||||
>x : any
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>);
|
||||
>foo1b : { (x: B<number[], number[]>): any; (x: B<number[], number[]>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>); // error
|
||||
>foo1b : { (x: B<number[], number[]>): any; (x: B<number[], number[]>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : { (x: B<number[], number[]>): any; (x: B<number[], number[]>): any; }
|
||||
>x : any
|
||||
|
||||
function foo1c(x: C<String, String>);
|
||||
>foo1c : { (x: C<String, String>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo1c(x: C<String, String>); // error
|
||||
>foo1c : { (x: C<String, String>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : { (x: C<String, String>): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo2(x: I<Number, Number>);
|
||||
>foo2 : { (x: I<Number, Number>): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo2(x: I<Number, Number>); // error
|
||||
>foo2 : { (x: I<Number, Number>): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : { (x: I<Number, Number>): any; (x: I<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : { (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : { (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : { (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
>foo5 : { (x: A): any; (x: B<number[], number[]>): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo5(x: B<Array<number>, Array<number>>); // ok
|
||||
>foo5 : { (x: A): any; (x: B<number[], number[]>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo5(x: any) { }
|
||||
>foo5 : { (x: A): any; (x: B<number[], number[]>): any; }
|
||||
>x : any
|
||||
|
||||
function foo5b(x: A);
|
||||
>foo5b : { (x: A): any; (x: C<String, String>): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo5b(x: C<String, String>); // ok
|
||||
>foo5b : { (x: A): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo5b(x: any) { }
|
||||
>foo5b : { (x: A): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo5c(x: C<String, String>);
|
||||
>foo5c : { (x: C<String, String>): any; (x: D<Number, Number>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo5c(x: D<Number, Number>); // ok
|
||||
>foo5c : { (x: C<String, String>): any; (x: D<Number, Number>): any; }
|
||||
>x : D<Number, Number>
|
||||
>D : D<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : { (x: C<String, String>): any; (x: D<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo6c(x: C<String, String>);
|
||||
>foo6c : { (x: C<String, String>): any; (x: D<any, Number>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo6c(x: D<any, Number>); // error, "any" does not satisfy the constraint
|
||||
>foo6c : { (x: C<String, String>): any; (x: D<any, Number>): any; }
|
||||
>x : D<any, Number>
|
||||
>D : D<T, U>
|
||||
>Number : Number
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : { (x: C<String, String>): any; (x: D<any, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo6(x: A);
|
||||
>foo6 : { (x: A): any; (x: I<Number, Number>): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo6(x: I<Number, Number>); // ok
|
||||
>foo6 : { (x: A): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo6(x: any) { }
|
||||
>foo6 : { (x: A): any; (x: I<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo7(x: A);
|
||||
>foo7 : { (x: A): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo7(x: typeof a); // ok
|
||||
>foo7 : { (x: A): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
|
||||
function foo7(x: any) { }
|
||||
>foo7 : { (x: A): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<Array<number>, Array<number>>);
|
||||
>foo8 : { (x: B<number[], number[]>): any; (x: I<Number, Number>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo8(x: I<Number, Number>); // ok
|
||||
>foo8 : { (x: B<number[], number[]>): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : { (x: B<number[], number[]>): any; (x: I<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo9(x: B<Array<number>, Array<number>>);
|
||||
>foo9 : { (x: B<number[], number[]>): any; (x: C<String, String>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo9(x: C<String, String>); // ok
|
||||
>foo9 : { (x: B<number[], number[]>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : { (x: B<number[], number[]>): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo10(x: B<Array<number>, Array<number>>);
|
||||
>foo10 : { (x: B<number[], number[]>): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : { (x: B<number[], number[]>): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : { (x: B<number[], number[]>): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Array<number>, Array<number>>);
|
||||
>foo11 : { (x: B<number[], number[]>): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<number[], number[]>): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<number[], number[]>): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Number, Number>);
|
||||
>foo12 : { (x: I<Number, Number>): any; (x: C<String, String>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo12(x: C<String, String>); // ok
|
||||
>foo12 : { (x: I<Number, Number>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : { (x: I<Number, Number>): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : I2
|
||||
>I2 : I2
|
||||
|
||||
function foo12b(x: C<String, String>); // ok
|
||||
>foo12b : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo13(x: I<Number, Number>);
|
||||
>foo13 : { (x: I<Number, Number>): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : { (x: I<Number, Number>): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends string[]>(x: T, y: U): string; }
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : { (x: I<Number, Number>): any; (x: { foo<T extends U, U extends string[]>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Number, Number>);
|
||||
>foo14 : { (x: I<Number, Number>): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Number, Number>): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Number, Number>): any; (x: { foo<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
>foo15 : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : I2
|
||||
>I2 : I2
|
||||
|
||||
function foo15(x: C<String, String>); // ok
|
||||
>foo15 : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo15(x: any) { }
|
||||
>foo15 : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(15,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(18,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(22,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(26,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(30,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(35,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(38,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts(39,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts (8 errors) ====
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class One { foo: string }
|
||||
class Two { foo: string }
|
||||
interface Three { foo: string }
|
||||
interface Four<T> { foo: T }
|
||||
interface Five<T> extends Four<T> { }
|
||||
interface Six<T, U> {
|
||||
foo: T;
|
||||
}
|
||||
|
||||
class A {
|
||||
foo<T extends U, U extends One>(x: T, y: U): string { return null; }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Two> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string { return null; }
|
||||
}
|
||||
|
||||
class C<T extends U, U extends Three> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string { return null; }
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Four<string>> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string { return null; }
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Five<string>> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo(x: T, y: U): string;
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
foo<T extends U, U extends Six<string, string>>(x: T, y: U): string;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
var a: { foo<T extends U, U extends One>(x: T, y: U): string }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b = { foo<T extends U, U extends Two>(x: T, y: U) { return ''; } };
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
function foo1(x: A);
|
||||
function foo1(x: A); // error
|
||||
function foo1(x: any) { }
|
||||
|
||||
function foo1b(x: B<Two, Two>);
|
||||
function foo1b(x: B<Two, Two>); // error
|
||||
function foo1b(x: any) { }
|
||||
|
||||
function foo1c(x: C<Three, Three>);
|
||||
function foo1c(x: C<Three, Three>); // error
|
||||
function foo1c(x: any) { }
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>);
|
||||
function foo2(x: I<Five<string>, Five<string>>); // error
|
||||
function foo2(x: any) { }
|
||||
|
||||
function foo3(x: typeof a);
|
||||
function foo3(x: typeof a); // error
|
||||
function foo3(x: any) { }
|
||||
|
||||
function foo4(x: typeof b);
|
||||
function foo4(x: typeof b); // error
|
||||
function foo4(x: any) { }
|
||||
|
||||
function foo5(x: A);
|
||||
function foo5(x: B<Two, Two>); // ok
|
||||
function foo5(x: any) { }
|
||||
|
||||
function foo5b(x: A);
|
||||
function foo5b(x: C<Three, Three>); // ok
|
||||
function foo5b(x: any) { }
|
||||
|
||||
function foo5c(x: C<Three, Three>);
|
||||
function foo5c(x: D<Four<string>, Four<string>>); // error
|
||||
function foo5c(x: any) { }
|
||||
|
||||
function foo6c(x: C<Three, Three>);
|
||||
function foo6c(x: D<Four<string>, Four<string>>); // error
|
||||
function foo6c(x: any) { }
|
||||
|
||||
function foo6(x: A);
|
||||
function foo6(x: I<Five<string>, Five<string>>); // ok
|
||||
function foo6(x: any) { }
|
||||
|
||||
function foo7(x: A);
|
||||
function foo7(x: typeof a); // error
|
||||
function foo7(x: any) { }
|
||||
|
||||
function foo8(x: B<Two, Two>);
|
||||
function foo8(x: I<Five<string>, Five<string>>); // error
|
||||
function foo8(x: any) { }
|
||||
|
||||
function foo9(x: B<Two, Two>);
|
||||
function foo9(x: C<Three, Three>); // error
|
||||
function foo9(x: any) { }
|
||||
|
||||
function foo10(x: B<Two, Two>);
|
||||
function foo10(x: typeof a); // ok
|
||||
function foo10(x: any) { }
|
||||
|
||||
function foo11(x: B<Two, Two>);
|
||||
function foo11(x: typeof b); // ok
|
||||
function foo11(x: any) { }
|
||||
|
||||
function foo12(x: I<Five<string>, Five<string>>);
|
||||
function foo12(x: C<Three, Three>); // error
|
||||
function foo12(x: any) { }
|
||||
|
||||
function foo12b(x: I2);
|
||||
function foo12b(x: C<Three, Three>); // ok
|
||||
function foo12b(x: any) { }
|
||||
|
||||
function foo13(x: I<Five<string>, Five<string>>);
|
||||
function foo13(x: typeof a); // ok
|
||||
function foo13(x: any) { }
|
||||
|
||||
function foo14(x: I<Five<string>, Five<string>>);
|
||||
function foo14(x: typeof b); // ok
|
||||
function foo14(x: any) { }
|
||||
|
||||
function foo15(x: I2);
|
||||
function foo15(x: C<Three, Three>); // ok
|
||||
function foo15(x: any) { }
|
||||
@@ -0,0 +1,497 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class One { foo: string }
|
||||
>One : Symbol(One, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 0, 0))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 11))
|
||||
|
||||
class Two { foo: string }
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 11))
|
||||
|
||||
interface Three { foo: string }
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 17))
|
||||
|
||||
interface Four<T> { foo: T }
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 15))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 19))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 15))
|
||||
|
||||
interface Five<T> extends Four<T> { }
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 8, 15))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 8, 15))
|
||||
|
||||
interface Six<T, U> {
|
||||
>Six : Symbol(Six, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 8, 37))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 9, 14))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 9, 16))
|
||||
|
||||
foo: T;
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 9, 21))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 9, 14))
|
||||
}
|
||||
|
||||
class A {
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
foo<T extends U, U extends One>(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 13, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 20))
|
||||
>One : Symbol(One, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 36))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 41))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 14, 20))
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Two> {
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 17, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 17, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 17, 20))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 17, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 18, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 17, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 18, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 17, 20))
|
||||
}
|
||||
|
||||
class C<T extends U, U extends Three> {
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 21, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 21, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 21, 20))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 21, 39))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 22, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 21, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 22, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 21, 20))
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Four<string>> {
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 25, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 25, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 25, 20))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 25, 46))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 26, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 25, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 26, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 25, 20))
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Five<string>> {
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 29, 12))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 29, 24))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 29, 24))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
foo(x: T, y: U): string;
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 29, 50))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 30, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 29, 12))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 30, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 29, 24))
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 31, 1))
|
||||
|
||||
foo<T extends U, U extends Six<string, string>>(x: T, y: U): string;
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 33, 14))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 20))
|
||||
>Six : Symbol(Six, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 8, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 52))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 57))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 34, 20))
|
||||
}
|
||||
|
||||
var a: { foo<T extends U, U extends One>(x: T, y: U): string }
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 3))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 25))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 25))
|
||||
>One : Symbol(One, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 41))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 13))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 46))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 25))
|
||||
|
||||
var b = { foo<T extends U, U extends Two>(x: T, y: U) { return ''; } };
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 3))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 14))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 26))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 26))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 42))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 14))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 47))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 26))
|
||||
|
||||
function foo1(x: A);
|
||||
>foo1 : Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 71), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 40, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 41, 20))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 40, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
function foo1(x: A); // error
|
||||
>foo1 : Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 71), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 40, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 41, 20))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 41, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
function foo1(x: any) { }
|
||||
>foo1 : Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 71), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 40, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 41, 20))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 42, 14))
|
||||
|
||||
function foo1b(x: B<Two, Two>);
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 42, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 44, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 45, 31))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 44, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo1b(x: B<Two, Two>); // error
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 42, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 44, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 45, 31))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 45, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 42, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 44, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 45, 31))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 46, 15))
|
||||
|
||||
function foo1c(x: C<Three, Three>);
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 46, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 48, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 49, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 48, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo1c(x: C<Three, Three>); // error
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 46, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 48, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 49, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 49, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 46, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 48, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 49, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 50, 15))
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>);
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 50, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 52, 48), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 53, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 52, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>); // error
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 50, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 52, 48), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 53, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 53, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 50, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 52, 48), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 53, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 54, 14))
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 54, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 56, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 57, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 56, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 3))
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 54, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 56, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 57, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 57, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 3))
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 54, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 56, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 57, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 58, 14))
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 58, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 60, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 61, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 60, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 3))
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 58, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 60, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 61, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 61, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 3))
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 58, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 60, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 61, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 62, 14))
|
||||
|
||||
function foo5(x: A);
|
||||
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 62, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 64, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 65, 30))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 64, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
function foo5(x: B<Two, Two>); // ok
|
||||
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 62, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 64, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 65, 30))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 65, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo5(x: any) { }
|
||||
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 62, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 64, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 65, 30))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 66, 14))
|
||||
|
||||
function foo5b(x: A);
|
||||
>foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 66, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 68, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 69, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 68, 15))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
function foo5b(x: C<Three, Three>); // ok
|
||||
>foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 66, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 68, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 69, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 69, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo5b(x: any) { }
|
||||
>foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 66, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 68, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 69, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 70, 15))
|
||||
|
||||
function foo5c(x: C<Three, Three>);
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 70, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 72, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 73, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 72, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo5c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 70, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 72, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 73, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 73, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 70, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 72, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 73, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 74, 15))
|
||||
|
||||
function foo6c(x: C<Three, Three>);
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 74, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 76, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 77, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 76, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo6c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 74, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 76, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 77, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 77, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 74, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 76, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 77, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 78, 15))
|
||||
|
||||
function foo6(x: A);
|
||||
>foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 78, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 80, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 81, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 80, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
function foo6(x: I<Five<string>, Five<string>>); // ok
|
||||
>foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 78, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 80, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 81, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 81, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo6(x: any) { }
|
||||
>foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 78, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 80, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 81, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 82, 14))
|
||||
|
||||
function foo7(x: A);
|
||||
>foo7 : Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 82, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 84, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 85, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 84, 14))
|
||||
>A : Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
|
||||
function foo7(x: typeof a); // error
|
||||
>foo7 : Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 82, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 84, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 85, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 85, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 3))
|
||||
|
||||
function foo7(x: any) { }
|
||||
>foo7 : Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 82, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 84, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 85, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 86, 14))
|
||||
|
||||
function foo8(x: B<Two, Two>);
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 86, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 88, 30), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 89, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 88, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo8(x: I<Five<string>, Five<string>>); // error
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 86, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 88, 30), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 89, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 89, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 86, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 88, 30), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 89, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 90, 14))
|
||||
|
||||
function foo9(x: B<Two, Two>);
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 90, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 92, 30), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 93, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 92, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo9(x: C<Three, Three>); // error
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 90, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 92, 30), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 93, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 93, 14))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 90, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 92, 30), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 93, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 94, 14))
|
||||
|
||||
function foo10(x: B<Two, Two>);
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 94, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 96, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 97, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 96, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 94, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 96, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 97, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 97, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 3))
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 94, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 96, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 97, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 98, 15))
|
||||
|
||||
function foo11(x: B<Two, Two>);
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 98, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 100, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 101, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 100, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 98, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 100, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 101, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 101, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 3))
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 98, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 100, 31), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 101, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 102, 15))
|
||||
|
||||
function foo12(x: I<Five<string>, Five<string>>);
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 102, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 104, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 105, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 104, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo12(x: C<Three, Three>); // error
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 102, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 104, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 105, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 105, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 102, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 104, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 105, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 106, 15))
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 106, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 108, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 109, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 108, 16))
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 31, 1))
|
||||
|
||||
function foo12b(x: C<Three, Three>); // ok
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 106, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 108, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 109, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 109, 16))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 106, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 108, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 109, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 110, 16))
|
||||
|
||||
function foo13(x: I<Five<string>, Five<string>>);
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 110, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 112, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 113, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 112, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 110, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 112, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 113, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 113, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 37, 3))
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 110, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 112, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 113, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 114, 15))
|
||||
|
||||
function foo14(x: I<Five<string>, Five<string>>);
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 114, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 116, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 117, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 116, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 114, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 116, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 117, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 117, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 38, 3))
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 114, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 116, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 117, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 118, 15))
|
||||
|
||||
function foo15(x: I2);
|
||||
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 118, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 120, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 121, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 120, 15))
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 31, 1))
|
||||
|
||||
function foo15(x: C<Three, Three>); // ok
|
||||
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 118, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 120, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 121, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 121, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo15(x: any) { }
|
||||
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 118, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 120, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 121, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts, 122, 15))
|
||||
|
||||
@@ -0,0 +1,503 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class One { foo: string }
|
||||
>One : One
|
||||
>foo : string
|
||||
|
||||
class Two { foo: string }
|
||||
>Two : Two
|
||||
>foo : string
|
||||
|
||||
interface Three { foo: string }
|
||||
>Three : Three
|
||||
>foo : string
|
||||
|
||||
interface Four<T> { foo: T }
|
||||
>Four : Four<T>
|
||||
>T : T
|
||||
>foo : T
|
||||
>T : T
|
||||
|
||||
interface Five<T> extends Four<T> { }
|
||||
>Five : Five<T>
|
||||
>T : T
|
||||
>Four : Four<T>
|
||||
>T : T
|
||||
|
||||
interface Six<T, U> {
|
||||
>Six : Six<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
foo: T;
|
||||
>foo : T
|
||||
>T : T
|
||||
}
|
||||
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
foo<T extends U, U extends One>(x: T, y: U): string { return null; }
|
||||
>foo : <T extends U, U extends One>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>One : One
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Two> {
|
||||
>B : B<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Two : Two
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class C<T extends U, U extends Three> {
|
||||
>C : C<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Three : Three
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Four<string>> {
|
||||
>D : D<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Four : Four<T>
|
||||
|
||||
foo(x: T, y: U): string { return null; }
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Five<string>> {
|
||||
>I : I<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Five : Five<T>
|
||||
|
||||
foo(x: T, y: U): string;
|
||||
>foo : (x: T, y: U) => string
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : I2
|
||||
|
||||
foo<T extends U, U extends Six<string, string>>(x: T, y: U): string;
|
||||
>foo : <T extends U, U extends Six<string, string>>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Six : Six<T, U>
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
var a: { foo<T extends U, U extends One>(x: T, y: U): string }
|
||||
>a : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
>foo : <T extends U, U extends One>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>One : One
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
|
||||
var b = { foo<T extends U, U extends Two>(x: T, y: U) { return ''; } };
|
||||
>b : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>{ foo<T extends U, U extends Two>(x: T, y: U) { return ''; } } : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>foo : <T extends U, U extends Two>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Two : Two
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>'' : string
|
||||
|
||||
function foo1(x: A);
|
||||
>foo1 : { (x: A): any; (x: A): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo1(x: A); // error
|
||||
>foo1 : { (x: A): any; (x: A): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo1(x: any) { }
|
||||
>foo1 : { (x: A): any; (x: A): any; }
|
||||
>x : any
|
||||
|
||||
function foo1b(x: B<Two, Two>);
|
||||
>foo1b : { (x: B<Two, Two>): any; (x: B<Two, Two>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo1b(x: B<Two, Two>); // error
|
||||
>foo1b : { (x: B<Two, Two>): any; (x: B<Two, Two>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : { (x: B<Two, Two>): any; (x: B<Two, Two>): any; }
|
||||
>x : any
|
||||
|
||||
function foo1c(x: C<Three, Three>);
|
||||
>foo1c : { (x: C<Three, Three>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo1c(x: C<Three, Three>); // error
|
||||
>foo1c : { (x: C<Three, Three>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : { (x: C<Three, Three>): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>);
|
||||
>foo2 : { (x: I<Five<string>, Five<string>>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>); // error
|
||||
>foo2 : { (x: I<Five<string>, Five<string>>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : { (x: I<Five<string>, Five<string>>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : { (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : { (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : { (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
>foo5 : { (x: A): any; (x: B<Two, Two>): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo5(x: B<Two, Two>); // ok
|
||||
>foo5 : { (x: A): any; (x: B<Two, Two>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo5(x: any) { }
|
||||
>foo5 : { (x: A): any; (x: B<Two, Two>): any; }
|
||||
>x : any
|
||||
|
||||
function foo5b(x: A);
|
||||
>foo5b : { (x: A): any; (x: C<Three, Three>): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo5b(x: C<Three, Three>); // ok
|
||||
>foo5b : { (x: A): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo5b(x: any) { }
|
||||
>foo5b : { (x: A): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo5c(x: C<Three, Three>);
|
||||
>foo5c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo5c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo5c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : D<Four<string>, Four<string>>
|
||||
>D : D<T, U>
|
||||
>Four : Four<T>
|
||||
>Four : Four<T>
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo6c(x: C<Three, Three>);
|
||||
>foo6c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo6c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo6c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : D<Four<string>, Four<string>>
|
||||
>D : D<T, U>
|
||||
>Four : Four<T>
|
||||
>Four : Four<T>
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo6(x: A);
|
||||
>foo6 : { (x: A): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo6(x: I<Five<string>, Five<string>>); // ok
|
||||
>foo6 : { (x: A): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo6(x: any) { }
|
||||
>foo6 : { (x: A): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo7(x: A);
|
||||
>foo7 : { (x: A): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : A
|
||||
>A : A
|
||||
|
||||
function foo7(x: typeof a); // error
|
||||
>foo7 : { (x: A): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
|
||||
function foo7(x: any) { }
|
||||
>foo7 : { (x: A): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<Two, Two>);
|
||||
>foo8 : { (x: B<Two, Two>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo8(x: I<Five<string>, Five<string>>); // error
|
||||
>foo8 : { (x: B<Two, Two>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : { (x: B<Two, Two>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo9(x: B<Two, Two>);
|
||||
>foo9 : { (x: B<Two, Two>): any; (x: C<Three, Three>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo9(x: C<Three, Three>); // error
|
||||
>foo9 : { (x: B<Two, Two>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : { (x: B<Two, Two>): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo10(x: B<Two, Two>);
|
||||
>foo10 : { (x: B<Two, Two>): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : { (x: B<Two, Two>): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : { (x: B<Two, Two>): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Two, Two>);
|
||||
>foo11 : { (x: B<Two, Two>): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<Two, Two>): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<Two, Two>): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Five<string>, Five<string>>);
|
||||
>foo12 : { (x: I<Five<string>, Five<string>>): any; (x: C<Three, Three>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo12(x: C<Three, Three>); // error
|
||||
>foo12 : { (x: I<Five<string>, Five<string>>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : { (x: I<Five<string>, Five<string>>): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : I2
|
||||
>I2 : I2
|
||||
|
||||
function foo12b(x: C<Three, Three>); // ok
|
||||
>foo12b : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo13(x: I<Five<string>, Five<string>>);
|
||||
>foo13 : { (x: I<Five<string>, Five<string>>): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : { (x: I<Five<string>, Five<string>>): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
>a : { foo<T extends U, U extends One>(x: T, y: U): string; }
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : { (x: I<Five<string>, Five<string>>): any; (x: { foo<T extends U, U extends One>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Five<string>, Five<string>>);
|
||||
>foo14 : { (x: I<Five<string>, Five<string>>): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Five<string>, Five<string>>): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { foo<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Five<string>, Five<string>>): any; (x: { foo<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
>foo15 : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : I2
|
||||
>I2 : I2
|
||||
|
||||
function foo15(x: C<Three, Three>); // ok
|
||||
>foo15 : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo15(x: any) { }
|
||||
>foo15 : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(5,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(9,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(13,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(17,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(22,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(25,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts(26,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts (7 errors) ====
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class B<T extends U, U extends Array<number>> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
constructor(x: T, y: U) { return null; }
|
||||
}
|
||||
|
||||
class C<T extends U, U extends String> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
constructor(x: T, y: U) { return null; }
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Number> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
constructor(x: T, y: U) { return null; }
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Number> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
new(x: T, y: U): string;
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
new<T extends U, U extends Boolean>(x: T, y: U): string;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
var a: { new<T extends U, U extends Array<string>>(x: T, y: U): string }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b = { new<T extends U, U extends RegExp>(x: T, y: U) { return ''; } }; // not a construct signature, function called new
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>);
|
||||
function foo1b(x: B<Array<number>, Array<number>>); // error
|
||||
function foo1b(x: any) { }
|
||||
|
||||
function foo1c(x: C<String, String>);
|
||||
function foo1c(x: C<String, String>); // error
|
||||
function foo1c(x: any) { }
|
||||
|
||||
function foo2(x: I<Number, Number>);
|
||||
function foo2(x: I<Number, Number>); // error
|
||||
function foo2(x: any) { }
|
||||
|
||||
function foo3(x: typeof a);
|
||||
function foo3(x: typeof a); // error
|
||||
function foo3(x: any) { }
|
||||
|
||||
function foo4(x: typeof b);
|
||||
function foo4(x: typeof b); // error
|
||||
function foo4(x: any) { }
|
||||
|
||||
function foo5c(x: C<String, String>);
|
||||
function foo5c(x: D<Number, Number>); // ok
|
||||
function foo5c(x: any) { }
|
||||
|
||||
function foo6c(x: C<String, String>);
|
||||
function foo6c(x: D<any, Number>); // ok
|
||||
function foo6c(x: any) { }
|
||||
|
||||
function foo8(x: B<Array<number>, Array<number>>);
|
||||
function foo8(x: I<Number, Number>); // ok
|
||||
function foo8(x: any) { }
|
||||
|
||||
function foo9(x: B<Array<number>, Array<number>>);
|
||||
function foo9(x: C<String, String>); // error, types are structurally equal
|
||||
function foo9(x: any) { }
|
||||
|
||||
function foo10(x: B<Array<number>, Array<number>>);
|
||||
function foo10(x: typeof a); // ok
|
||||
function foo10(x: any) { }
|
||||
|
||||
function foo11(x: B<Array<number>, Array<number>>);
|
||||
function foo11(x: typeof b); // ok
|
||||
function foo11(x: any) { }
|
||||
|
||||
function foo12(x: I<Number, Number>);
|
||||
function foo12(x: C<String, String>); // ok
|
||||
function foo12(x: any) { }
|
||||
|
||||
function foo12b(x: I2);
|
||||
function foo12b(x: C<String, String>); // ok
|
||||
function foo12b(x: any) { }
|
||||
|
||||
function foo13(x: I<Number, Number>);
|
||||
function foo13(x: typeof a); // ok
|
||||
function foo13(x: any) { }
|
||||
|
||||
function foo14(x: I<Number, Number>);
|
||||
function foo14(x: typeof b); // ok
|
||||
function foo14(x: any) { }
|
||||
@@ -0,0 +1,349 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class B<T extends U, U extends Array<number>> {
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 4, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 4, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 4, 20))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 5, 16))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 4, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 5, 21))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 4, 20))
|
||||
}
|
||||
|
||||
class C<T extends U, U extends String> {
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 20))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 9, 16))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 9, 21))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 8, 20))
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Number> {
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 12, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 12, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 12, 20))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 13, 16))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 12, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 13, 21))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 12, 20))
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Number> {
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 16, 12))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 16, 24))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 16, 24))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
new(x: T, y: U): string;
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 17, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 16, 12))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 17, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 16, 24))
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
|
||||
new<T extends U, U extends Boolean>(x: T, y: U): string;
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 20))
|
||||
>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 40))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 45))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 21, 20))
|
||||
}
|
||||
|
||||
var a: { new<T extends U, U extends Array<string>>(x: T, y: U): string }
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 3))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 25))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 25))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 51))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 13))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 56))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 25))
|
||||
|
||||
var b = { new<T extends U, U extends RegExp>(x: T, y: U) { return ''; } }; // not a construct signature, function called new
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 3))
|
||||
>new : Symbol(new, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 14))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 26))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 26))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 45))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 14))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 50))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 26))
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>);
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 74), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 27, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 28, 51))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 27, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>); // error
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 74), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 27, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 28, 51))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 28, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 74), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 27, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 28, 51))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 15))
|
||||
|
||||
function foo1c(x: C<String, String>);
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1c(x: C<String, String>); // error
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 31, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 32, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 33, 15))
|
||||
|
||||
function foo2(x: I<Number, Number>);
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 33, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 35, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 36, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 35, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo2(x: I<Number, Number>); // error
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 33, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 35, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 36, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 36, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 33, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 35, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 36, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 37, 14))
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 37, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 39, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 40, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 39, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 3))
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 37, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 39, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 40, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 40, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 3))
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 37, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 39, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 40, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 41, 14))
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 43, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 44, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 43, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 3))
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 43, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 44, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 44, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 3))
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 43, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 44, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 45, 14))
|
||||
|
||||
function foo5c(x: C<String, String>);
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 48, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo5c(x: D<Number, Number>); // ok
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 48, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 48, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 47, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 48, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 49, 15))
|
||||
|
||||
function foo6c(x: C<String, String>);
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 49, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 52, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo6c(x: D<any, Number>); // ok
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 49, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 52, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 52, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 10, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 49, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 51, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 52, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 53, 15))
|
||||
|
||||
function foo8(x: B<Array<number>, Array<number>>);
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 55, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 56, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 55, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo8(x: I<Number, Number>); // ok
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 55, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 56, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 56, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 55, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 56, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 57, 14))
|
||||
|
||||
function foo9(x: B<Array<number>, Array<number>>);
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 59, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 59, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo9(x: C<String, String>); // error, types are structurally equal
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 59, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 14))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 57, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 59, 50), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 60, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 61, 14))
|
||||
|
||||
function foo10(x: B<Array<number>, Array<number>>);
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 61, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 63, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 64, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 63, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 61, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 63, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 64, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 64, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 3))
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 61, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 63, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 64, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 65, 15))
|
||||
|
||||
function foo11(x: B<Array<number>, Array<number>>);
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 67, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 68, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 67, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 67, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 68, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 68, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 3))
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 65, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 67, 51), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 68, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 69, 15))
|
||||
|
||||
function foo12(x: I<Number, Number>);
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 71, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 71, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo12(x: C<String, String>); // ok
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 71, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 71, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 72, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 73, 15))
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 75, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 38))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 75, 16))
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 18, 1))
|
||||
|
||||
function foo12b(x: C<String, String>); // ok
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 75, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 38))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 16))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 6, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 75, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 76, 38))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 77, 16))
|
||||
|
||||
function foo13(x: I<Number, Number>);
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 77, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 79, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 80, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 79, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 77, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 79, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 80, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 80, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 24, 3))
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 77, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 79, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 80, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 81, 15))
|
||||
|
||||
function foo14(x: I<Number, Number>);
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 81, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 83, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 84, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 83, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 14, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 81, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 83, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 84, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 84, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 25, 3))
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 81, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 83, 37), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 84, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts, 85, 15))
|
||||
|
||||
@@ -0,0 +1,354 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class B<T extends U, U extends Array<number>> {
|
||||
>B : B<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Array : T[]
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class C<T extends U, U extends String> {
|
||||
>C : C<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>String : String
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Number> {
|
||||
>D : D<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Number : Number
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Number> {
|
||||
>I : I<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Number : Number
|
||||
|
||||
new(x: T, y: U): string;
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : I2
|
||||
|
||||
new<T extends U, U extends Boolean>(x: T, y: U): string;
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Boolean : Boolean
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
var a: { new<T extends U, U extends Array<string>>(x: T, y: U): string }
|
||||
>a : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Array : T[]
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
|
||||
var b = { new<T extends U, U extends RegExp>(x: T, y: U) { return ''; } }; // not a construct signature, function called new
|
||||
>b : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>{ new<T extends U, U extends RegExp>(x: T, y: U) { return ''; } } : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>new : <T extends U, U extends RegExp>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>RegExp : RegExp
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>'' : string
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>);
|
||||
>foo1b : { (x: B<number[], number[]>): any; (x: B<number[], number[]>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo1b(x: B<Array<number>, Array<number>>); // error
|
||||
>foo1b : { (x: B<number[], number[]>): any; (x: B<number[], number[]>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : { (x: B<number[], number[]>): any; (x: B<number[], number[]>): any; }
|
||||
>x : any
|
||||
|
||||
function foo1c(x: C<String, String>);
|
||||
>foo1c : { (x: C<String, String>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo1c(x: C<String, String>); // error
|
||||
>foo1c : { (x: C<String, String>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : { (x: C<String, String>): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo2(x: I<Number, Number>);
|
||||
>foo2 : { (x: I<Number, Number>): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo2(x: I<Number, Number>); // error
|
||||
>foo2 : { (x: I<Number, Number>): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : { (x: I<Number, Number>): any; (x: I<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : { (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : { (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : { (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5c(x: C<String, String>);
|
||||
>foo5c : { (x: C<String, String>): any; (x: D<Number, Number>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo5c(x: D<Number, Number>); // ok
|
||||
>foo5c : { (x: C<String, String>): any; (x: D<Number, Number>): any; }
|
||||
>x : D<Number, Number>
|
||||
>D : D<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : { (x: C<String, String>): any; (x: D<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo6c(x: C<String, String>);
|
||||
>foo6c : { (x: C<String, String>): any; (x: D<any, Number>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo6c(x: D<any, Number>); // ok
|
||||
>foo6c : { (x: C<String, String>): any; (x: D<any, Number>): any; }
|
||||
>x : D<any, Number>
|
||||
>D : D<T, U>
|
||||
>Number : Number
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : { (x: C<String, String>): any; (x: D<any, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<Array<number>, Array<number>>);
|
||||
>foo8 : { (x: B<number[], number[]>): any; (x: I<Number, Number>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo8(x: I<Number, Number>); // ok
|
||||
>foo8 : { (x: B<number[], number[]>): any; (x: I<Number, Number>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : { (x: B<number[], number[]>): any; (x: I<Number, Number>): any; }
|
||||
>x : any
|
||||
|
||||
function foo9(x: B<Array<number>, Array<number>>);
|
||||
>foo9 : { (x: B<number[], number[]>): any; (x: C<String, String>): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo9(x: C<String, String>); // error, types are structurally equal
|
||||
>foo9 : { (x: B<number[], number[]>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : { (x: B<number[], number[]>): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo10(x: B<Array<number>, Array<number>>);
|
||||
>foo10 : { (x: B<number[], number[]>): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : { (x: B<number[], number[]>): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : { (x: B<number[], number[]>): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Array<number>, Array<number>>);
|
||||
>foo11 : { (x: B<number[], number[]>): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : B<number[], number[]>
|
||||
>B : B<T, U>
|
||||
>Array : T[]
|
||||
>Array : T[]
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<number[], number[]>): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<number[], number[]>): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Number, Number>);
|
||||
>foo12 : { (x: I<Number, Number>): any; (x: C<String, String>): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo12(x: C<String, String>); // ok
|
||||
>foo12 : { (x: I<Number, Number>): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : { (x: I<Number, Number>): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : I2
|
||||
>I2 : I2
|
||||
|
||||
function foo12b(x: C<String, String>); // ok
|
||||
>foo12b : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : C<String, String>
|
||||
>C : C<T, U>
|
||||
>String : String
|
||||
>String : String
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : { (x: I2): any; (x: C<String, String>): any; }
|
||||
>x : any
|
||||
|
||||
function foo13(x: I<Number, Number>);
|
||||
>foo13 : { (x: I<Number, Number>): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : { (x: I<Number, Number>): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends string[]>(x: T, y: U) => string
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : { (x: I<Number, Number>): any; (x: new <T extends U, U extends string[]>(x: T, y: U) => string): any; }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Number, Number>);
|
||||
>foo14 : { (x: I<Number, Number>): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : I<Number, Number>
|
||||
>I : I<T, U>
|
||||
>Number : Number
|
||||
>Number : Number
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Number, Number>): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends RegExp>(x: T, y: U): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Number, Number>): any; (x: { new<T extends U, U extends RegExp>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(14,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(18,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(22,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(26,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(31,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(34,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts(35,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts (7 errors) ====
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class One { foo: string }
|
||||
class Two { foo: string }
|
||||
interface Three { foo: string }
|
||||
interface Four<T> { foo: T }
|
||||
interface Five<T> extends Four<T> { }
|
||||
interface Six<T, U> {
|
||||
foo: T;
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Two> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
constructor(x: T, y: U) { return null; }
|
||||
}
|
||||
|
||||
class C<T extends U, U extends Three> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
constructor(x: T, y: U) { return null; }
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Four<string>> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
constructor(x: T, y: U) { return null; }
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Five<string>> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
new(x: T, y: U): string;
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
new<T extends U, U extends Six<string, string>>(x: T, y: U): string;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
|
||||
var a: { new<T extends U, U extends One>(x: T, y: U): string }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var b = { new<T extends U, U extends Two>(x: T, y: U) { return ''; } }; // not a construct signature, function called new
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
function foo1b(x: B<Two, Two>);
|
||||
function foo1b(x: B<Two, Two>); // error
|
||||
function foo1b(x: any) { }
|
||||
|
||||
function foo1c(x: C<Three, Three>);
|
||||
function foo1c(x: C<Three, Three>); // error
|
||||
function foo1c(x: any) { }
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>);
|
||||
function foo2(x: I<Five<string>, Five<string>>); // error
|
||||
function foo2(x: any) { }
|
||||
|
||||
function foo3(x: typeof a);
|
||||
function foo3(x: typeof a); // error
|
||||
function foo3(x: any) { }
|
||||
|
||||
function foo4(x: typeof b);
|
||||
function foo4(x: typeof b); // error
|
||||
function foo4(x: any) { }
|
||||
|
||||
function foo5c(x: C<Three, Three>);
|
||||
function foo5c(x: D<Four<string>, Four<string>>); // error
|
||||
function foo5c(x: any) { }
|
||||
|
||||
function foo6c(x: C<Three, Three>);
|
||||
function foo6c(x: D<Four<string>, Four<string>>); // error
|
||||
function foo6c(x: any) { }
|
||||
|
||||
function foo8(x: B<Two, Two>);
|
||||
function foo8(x: I<Five<string>, Five<string>>); // error
|
||||
function foo8(x: any) { }
|
||||
|
||||
function foo9(x: B<Two, Two>);
|
||||
function foo9(x: C<Three, Three>); // error
|
||||
function foo9(x: any) { }
|
||||
|
||||
function foo10(x: B<Two, Two>);
|
||||
function foo10(x: typeof a); // ok
|
||||
function foo10(x: any) { }
|
||||
|
||||
function foo11(x: B<Two, Two>);
|
||||
function foo11(x: typeof b); // ok
|
||||
function foo11(x: any) { }
|
||||
|
||||
function foo12(x: I<Five<string>, Five<string>>);
|
||||
function foo12(x: C<Three, Three>); // ok
|
||||
function foo12(x: any) { }
|
||||
|
||||
function foo12b(x: I2);
|
||||
function foo12b(x: C<Three, Three>); // ok
|
||||
function foo12b(x: any) { }
|
||||
|
||||
function foo13(x: I<Five<string>, Five<string>>);
|
||||
function foo13(x: typeof a); // ok
|
||||
function foo13(x: any) { }
|
||||
|
||||
function foo14(x: I<Five<string>, Five<string>>);
|
||||
function foo14(x: typeof b); // ok
|
||||
function foo14(x: any) { }
|
||||
@@ -0,0 +1,384 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class One { foo: string }
|
||||
>One : Symbol(One, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 0, 0))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 11))
|
||||
|
||||
class Two { foo: string }
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 11))
|
||||
|
||||
interface Three { foo: string }
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 17))
|
||||
|
||||
interface Four<T> { foo: T }
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 15))
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 19))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 15))
|
||||
|
||||
interface Five<T> extends Four<T> { }
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 8, 15))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 8, 15))
|
||||
|
||||
interface Six<T, U> {
|
||||
>Six : Symbol(Six, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 8, 37))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 9, 14))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 9, 16))
|
||||
|
||||
foo: T;
|
||||
>foo : Symbol(foo, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 9, 21))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 9, 14))
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Two> {
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 13, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 13, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 13, 20))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 14, 16))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 13, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 14, 21))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 13, 20))
|
||||
}
|
||||
|
||||
class C<T extends U, U extends Three> {
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 17, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 17, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 17, 20))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 18, 16))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 17, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 18, 21))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 17, 20))
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Four<string>> {
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 21, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 21, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 21, 20))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 22, 16))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 21, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 22, 21))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 21, 20))
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Five<string>> {
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 25, 12))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 25, 24))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 25, 24))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
new(x: T, y: U): string;
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 26, 8))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 25, 12))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 26, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 25, 24))
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
|
||||
new<T extends U, U extends Six<string, string>>(x: T, y: U): string;
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 8))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 20))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 20))
|
||||
>Six : Symbol(Six, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 8, 37))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 52))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 8))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 57))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 30, 20))
|
||||
}
|
||||
|
||||
var a: { new<T extends U, U extends One>(x: T, y: U): string }
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 3))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 13))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 25))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 25))
|
||||
>One : Symbol(One, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 41))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 13))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 46))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 25))
|
||||
|
||||
var b = { new<T extends U, U extends Two>(x: T, y: U) { return ''; } }; // not a construct signature, function called new
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 3))
|
||||
>new : Symbol(new, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 9))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 14))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 26))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 26))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 42))
|
||||
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 14))
|
||||
>y : Symbol(y, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 47))
|
||||
>U : Symbol(U, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 26))
|
||||
|
||||
function foo1b(x: B<Two, Two>);
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 71), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 36, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 37, 31))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 36, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo1b(x: B<Two, Two>); // error
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 71), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 36, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 37, 31))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 37, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 71), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 36, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 37, 31))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 38, 15))
|
||||
|
||||
function foo1c(x: C<Three, Three>);
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 38, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 40, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 41, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 40, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo1c(x: C<Three, Three>); // error
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 38, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 40, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 41, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 41, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 38, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 40, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 41, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 42, 15))
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>);
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 42, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 44, 48), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 45, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 44, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>); // error
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 42, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 44, 48), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 45, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 45, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 42, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 44, 48), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 45, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 46, 14))
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 46, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 48, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 49, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 48, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 3))
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 46, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 48, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 49, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 49, 14))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 3))
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 46, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 48, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 49, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 50, 14))
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 50, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 52, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 53, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 52, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 3))
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 50, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 52, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 53, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 53, 14))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 3))
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 50, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 52, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 53, 27))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 54, 14))
|
||||
|
||||
function foo5c(x: C<Three, Three>);
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 54, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 56, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 57, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 56, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo5c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 54, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 56, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 57, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 57, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : Symbol(foo5c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 54, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 56, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 57, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 58, 15))
|
||||
|
||||
function foo6c(x: C<Three, Three>);
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 58, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 60, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 61, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 60, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo6c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 58, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 60, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 61, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 61, 15))
|
||||
>D : Symbol(D, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 19, 1))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
>Four : Symbol(Four, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 6, 31))
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : Symbol(foo6c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 58, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 60, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 61, 49))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 62, 15))
|
||||
|
||||
function foo8(x: B<Two, Two>);
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 62, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 64, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 65, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 64, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo8(x: I<Five<string>, Five<string>>); // error
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 62, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 64, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 65, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 65, 14))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 62, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 64, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 65, 48))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 66, 14))
|
||||
|
||||
function foo9(x: B<Two, Two>);
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 66, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 68, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 69, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 68, 14))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo9(x: C<Three, Three>); // error
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 66, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 68, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 69, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 69, 14))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 66, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 68, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 69, 34))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 70, 14))
|
||||
|
||||
function foo10(x: B<Two, Two>);
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 70, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 72, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 73, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 72, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 70, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 72, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 73, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 73, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 3))
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 70, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 72, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 73, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 74, 15))
|
||||
|
||||
function foo11(x: B<Two, Two>);
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 74, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 76, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 77, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 76, 15))
|
||||
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 11, 1))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
>Two : Symbol(Two, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 4, 25))
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 74, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 76, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 77, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 77, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 3))
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 74, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 76, 31), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 77, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 78, 15))
|
||||
|
||||
function foo12(x: I<Five<string>, Five<string>>);
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 78, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 80, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 81, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 80, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo12(x: C<Three, Three>); // ok
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 78, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 80, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 81, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 81, 15))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 78, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 80, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 81, 35))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 82, 15))
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 82, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 84, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 85, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 84, 16))
|
||||
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 27, 1))
|
||||
|
||||
function foo12b(x: C<Three, Three>); // ok
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 82, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 84, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 85, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 85, 16))
|
||||
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 15, 1))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
>Three : Symbol(Three, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 5, 25))
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 82, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 84, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 85, 36))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 86, 16))
|
||||
|
||||
function foo13(x: I<Five<string>, Five<string>>);
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 86, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 88, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 89, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 88, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 86, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 88, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 89, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 89, 15))
|
||||
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 33, 3))
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 86, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 88, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 89, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 90, 15))
|
||||
|
||||
function foo14(x: I<Five<string>, Five<string>>);
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 90, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 92, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 93, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 92, 15))
|
||||
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 23, 1))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
>Five : Symbol(Five, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 7, 28))
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 90, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 92, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 93, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 93, 15))
|
||||
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 34, 3))
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 90, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 92, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 93, 28))
|
||||
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts, 94, 15))
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts ===
|
||||
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
||||
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
||||
// optional or rest) and types, and identical return types.
|
||||
|
||||
class One { foo: string }
|
||||
>One : One
|
||||
>foo : string
|
||||
|
||||
class Two { foo: string }
|
||||
>Two : Two
|
||||
>foo : string
|
||||
|
||||
interface Three { foo: string }
|
||||
>Three : Three
|
||||
>foo : string
|
||||
|
||||
interface Four<T> { foo: T }
|
||||
>Four : Four<T>
|
||||
>T : T
|
||||
>foo : T
|
||||
>T : T
|
||||
|
||||
interface Five<T> extends Four<T> { }
|
||||
>Five : Five<T>
|
||||
>T : T
|
||||
>Four : Four<T>
|
||||
>T : T
|
||||
|
||||
interface Six<T, U> {
|
||||
>Six : Six<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
foo: T;
|
||||
>foo : T
|
||||
>T : T
|
||||
}
|
||||
|
||||
class B<T extends U, U extends Two> {
|
||||
>B : B<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Two : Two
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class C<T extends U, U extends Three> {
|
||||
>C : C<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Three : Three
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
class D<T extends U, U extends Four<string>> {
|
||||
>D : D<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Four : Four<T>
|
||||
|
||||
constructor(x: T, y: U) { return null; }
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>null : null
|
||||
}
|
||||
|
||||
interface I<T extends U, U extends Five<string>> {
|
||||
>I : I<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Five : Five<T>
|
||||
|
||||
new(x: T, y: U): string;
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
>I2 : I2
|
||||
|
||||
new<T extends U, U extends Six<string, string>>(x: T, y: U): string;
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Six : Six<T, U>
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
}
|
||||
|
||||
var a: { new<T extends U, U extends One>(x: T, y: U): string }
|
||||
>a : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>One : One
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
|
||||
var b = { new<T extends U, U extends Two>(x: T, y: U) { return ''; } }; // not a construct signature, function called new
|
||||
>b : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>{ new<T extends U, U extends Two>(x: T, y: U) { return ''; } } : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>new : <T extends U, U extends Two>(x: T, y: U) => string
|
||||
>T : T
|
||||
>U : U
|
||||
>U : U
|
||||
>Two : Two
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>'' : string
|
||||
|
||||
function foo1b(x: B<Two, Two>);
|
||||
>foo1b : { (x: B<Two, Two>): any; (x: B<Two, Two>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo1b(x: B<Two, Two>); // error
|
||||
>foo1b : { (x: B<Two, Two>): any; (x: B<Two, Two>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo1b(x: any) { }
|
||||
>foo1b : { (x: B<Two, Two>): any; (x: B<Two, Two>): any; }
|
||||
>x : any
|
||||
|
||||
function foo1c(x: C<Three, Three>);
|
||||
>foo1c : { (x: C<Three, Three>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo1c(x: C<Three, Three>); // error
|
||||
>foo1c : { (x: C<Three, Three>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo1c(x: any) { }
|
||||
>foo1c : { (x: C<Three, Three>): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>);
|
||||
>foo2 : { (x: I<Five<string>, Five<string>>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo2(x: I<Five<string>, Five<string>>); // error
|
||||
>foo2 : { (x: I<Five<string>, Five<string>>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo2(x: any) { }
|
||||
>foo2 : { (x: I<Five<string>, Five<string>>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo3(x: typeof a);
|
||||
>foo3 : { (x: new <T extends U, U extends One>(x: T, y: U) => string): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
|
||||
function foo3(x: typeof a); // error
|
||||
>foo3 : { (x: new <T extends U, U extends One>(x: T, y: U) => string): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
|
||||
function foo3(x: any) { }
|
||||
>foo3 : { (x: new <T extends U, U extends One>(x: T, y: U) => string): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5c(x: C<Three, Three>);
|
||||
>foo5c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo5c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo5c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : D<Four<string>, Four<string>>
|
||||
>D : D<T, U>
|
||||
>Four : Four<T>
|
||||
>Four : Four<T>
|
||||
|
||||
function foo5c(x: any) { }
|
||||
>foo5c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo6c(x: C<Three, Three>);
|
||||
>foo6c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo6c(x: D<Four<string>, Four<string>>); // error
|
||||
>foo6c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : D<Four<string>, Four<string>>
|
||||
>D : D<T, U>
|
||||
>Four : Four<T>
|
||||
>Four : Four<T>
|
||||
|
||||
function foo6c(x: any) { }
|
||||
>foo6c : { (x: C<Three, Three>): any; (x: D<Four<string>, Four<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<Two, Two>);
|
||||
>foo8 : { (x: B<Two, Two>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo8(x: I<Five<string>, Five<string>>); // error
|
||||
>foo8 : { (x: B<Two, Two>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo8(x: any) { }
|
||||
>foo8 : { (x: B<Two, Two>): any; (x: I<Five<string>, Five<string>>): any; }
|
||||
>x : any
|
||||
|
||||
function foo9(x: B<Two, Two>);
|
||||
>foo9 : { (x: B<Two, Two>): any; (x: C<Three, Three>): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo9(x: C<Three, Three>); // error
|
||||
>foo9 : { (x: B<Two, Two>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo9(x: any) { }
|
||||
>foo9 : { (x: B<Two, Two>): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo10(x: B<Two, Two>);
|
||||
>foo10 : { (x: B<Two, Two>): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo10(x: typeof a); // ok
|
||||
>foo10 : { (x: B<Two, Two>): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
|
||||
function foo10(x: any) { }
|
||||
>foo10 : { (x: B<Two, Two>): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Two, Two>);
|
||||
>foo11 : { (x: B<Two, Two>): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : B<Two, Two>
|
||||
>B : B<T, U>
|
||||
>Two : Two
|
||||
>Two : Two
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<Two, Two>): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<Two, Two>): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Five<string>, Five<string>>);
|
||||
>foo12 : { (x: I<Five<string>, Five<string>>): any; (x: C<Three, Three>): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo12(x: C<Three, Three>); // ok
|
||||
>foo12 : { (x: I<Five<string>, Five<string>>): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo12(x: any) { }
|
||||
>foo12 : { (x: I<Five<string>, Five<string>>): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo12b(x: I2);
|
||||
>foo12b : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : I2
|
||||
>I2 : I2
|
||||
|
||||
function foo12b(x: C<Three, Three>); // ok
|
||||
>foo12b : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : C<Three, Three>
|
||||
>C : C<T, U>
|
||||
>Three : Three
|
||||
>Three : Three
|
||||
|
||||
function foo12b(x: any) { }
|
||||
>foo12b : { (x: I2): any; (x: C<Three, Three>): any; }
|
||||
>x : any
|
||||
|
||||
function foo13(x: I<Five<string>, Five<string>>);
|
||||
>foo13 : { (x: I<Five<string>, Five<string>>): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo13(x: typeof a); // ok
|
||||
>foo13 : { (x: I<Five<string>, Five<string>>): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
>a : new <T extends U, U extends One>(x: T, y: U) => string
|
||||
|
||||
function foo13(x: any) { }
|
||||
>foo13 : { (x: I<Five<string>, Five<string>>): any; (x: new <T extends U, U extends One>(x: T, y: U) => string): any; }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Five<string>, Five<string>>);
|
||||
>foo14 : { (x: I<Five<string>, Five<string>>): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : I<Five<string>, Five<string>>
|
||||
>I : I<T, U>
|
||||
>Five : Five<T>
|
||||
>Five : Five<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Five<string>, Five<string>>): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
>b : { new<T extends U, U extends Two>(x: T, y: U): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Five<string>, Five<string>>): any; (x: { new<T extends U, U extends Two>(x: T, y: U): string; }): any; }
|
||||
>x : any
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint2.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint2.ts(1,19): error TS2304: Cannot find name 'List'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint2.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint2.ts (1 errors) ====
|
||||
class C<T extends List<T> > {
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'List'.
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint3.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint3.ts(1,19): error TS2304: Cannot find name 'List'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint3.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint3.ts (1 errors) ====
|
||||
class C<T extends List<T>> {
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'List'.
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint4.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint4.ts(1,19): error TS2304: Cannot find name 'List'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint4.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint4.ts (1 errors) ====
|
||||
class C<T extends List<List<T> > > {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'List'.
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint5.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint5.ts(1,19): error TS2304: Cannot find name 'List'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint5.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint5.ts (1 errors) ====
|
||||
class C<T extends List<List<T>> > {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'List'.
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint6.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint6.ts(1,19): error TS2304: Cannot find name 'List'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint6.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint6.ts (1 errors) ====
|
||||
class C<T extends List<List<T> >> {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'List'.
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint7.ts(1,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint7.ts(1,19): error TS2304: Cannot find name 'List'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint7.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint7.ts (1 errors) ====
|
||||
class C<T extends List<List<T>>> {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'List'.
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/compiler/primitiveConstraints1.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/primitiveConstraints1.ts(4,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/primitiveConstraints1.ts(2,6): error TS2344: Type 'string' does not satisfy the constraint 'number'.
|
||||
tests/cases/compiler/primitiveConstraints1.ts(5,14): error TS2344: Type 'string' does not satisfy the constraint 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/primitiveConstraints1.ts (2 errors) ====
|
||||
function foo1<T extends U, U>(t: T, u: U) { }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo1<string, number>('hm', 1); // no error
|
||||
~~~~~~
|
||||
!!! error TS2344: Type 'string' does not satisfy the constraint 'number'.
|
||||
|
||||
function foo2<T, U extends T>(t: T, u: U) { }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo2<number, string>(1, 'hm'); // error
|
||||
~~~~~~
|
||||
!!! error TS2344: Type 'string' does not satisfy the constraint 'number'.
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts(13,22): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts(31,26): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts(39,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts(40,6): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts(42,14): error TS2339: Property 'foo' does not exist on type '{}'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts(49,24): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts (6 errors) ====
|
||||
// generic types should behave as if they have properties of their constraint type
|
||||
|
||||
class A {
|
||||
foo(): string { return ''; }
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
bar(): string {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
class C<U extends A, T extends U> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
f() {
|
||||
var x: T;
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
return a + x.foo();
|
||||
}
|
||||
|
||||
g(x: U) {
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
return a + x.foo();
|
||||
}
|
||||
}
|
||||
|
||||
var r1a = (new C<A, B>()).f();
|
||||
var r1b = (new C<A, B>()).g(new B());
|
||||
|
||||
interface I<U extends A, T extends U> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo: T;
|
||||
}
|
||||
var i: I<A, B>;
|
||||
var r2 = i.foo.foo();
|
||||
var r2b = i.foo['foo']();
|
||||
|
||||
var a: {
|
||||
<U extends A, T extends U>(): T;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
<U extends T, T extends A>(x: U): U;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
var r3 = a().foo(); // error, no inferences for U so it doesn't satisfy constraint
|
||||
~~~
|
||||
!!! error TS2339: Property 'foo' does not exist on type '{}'.
|
||||
var r3b = a()['foo']();
|
||||
// parameter supplied for type argument inference for U
|
||||
var r3c = a(new B()).foo(); // valid call to an invalid function, U is inferred as B, which has a foo
|
||||
var r3d = a(new B())['foo'](); // valid call to an invalid function, U is inferred as B, which has a foo
|
||||
|
||||
var b = {
|
||||
foo: <U extends A, T extends U>(x: T) => {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
return a + x.foo();
|
||||
}
|
||||
}
|
||||
|
||||
var r4 = b.foo(new B()); // valid call to an invalid function
|
||||
@@ -0,0 +1,190 @@
|
||||
=== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts ===
|
||||
// generic types should behave as if they have properties of their constraint type
|
||||
|
||||
class A {
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
|
||||
foo(): string { return ''; }
|
||||
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
|
||||
bar(): string {
|
||||
>bar : Symbol(bar, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 6, 19))
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
class C<U extends A, T extends U> {
|
||||
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 10, 1))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 8))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 20))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 8))
|
||||
|
||||
f() {
|
||||
>f : Symbol(f, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 35))
|
||||
|
||||
var x: T;
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 14, 11))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 20))
|
||||
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 16, 11))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 14, 11))
|
||||
>'foo' : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
return a + x.foo();
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 16, 11))
|
||||
>x.foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 14, 11))
|
||||
>foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
}
|
||||
|
||||
g(x: U) {
|
||||
>g : Symbol(g, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 18, 5))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 20, 6))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 8))
|
||||
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 22, 11))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 20, 6))
|
||||
>'foo' : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
return a + x.foo();
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 22, 11))
|
||||
>x.foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 20, 6))
|
||||
>foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
}
|
||||
}
|
||||
|
||||
var r1a = (new C<A, B>()).f();
|
||||
>r1a : Symbol(r1a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 27, 3))
|
||||
>(new C<A, B>()).f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 35))
|
||||
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 10, 1))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
>f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 12, 35))
|
||||
|
||||
var r1b = (new C<A, B>()).g(new B());
|
||||
>r1b : Symbol(r1b, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 28, 3))
|
||||
>(new C<A, B>()).g : Symbol(C.g, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 18, 5))
|
||||
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 10, 1))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
>g : Symbol(C.g, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 18, 5))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
|
||||
interface I<U extends A, T extends U> {
|
||||
>I : Symbol(I, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 28, 37))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 12))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 24))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 12))
|
||||
|
||||
foo: T;
|
||||
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 39))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 24))
|
||||
}
|
||||
var i: I<A, B>;
|
||||
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 33, 3))
|
||||
>I : Symbol(I, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 28, 37))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
|
||||
var r2 = i.foo.foo();
|
||||
>r2 : Symbol(r2, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 34, 3))
|
||||
>i.foo.foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
>i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 39))
|
||||
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 33, 3))
|
||||
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 39))
|
||||
>foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
var r2b = i.foo['foo']();
|
||||
>r2b : Symbol(r2b, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 35, 3))
|
||||
>i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 39))
|
||||
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 33, 3))
|
||||
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 30, 39))
|
||||
>'foo' : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
var a: {
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 37, 3))
|
||||
|
||||
<U extends A, T extends U>(): T;
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 38, 5))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 38, 17))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 38, 5))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 38, 17))
|
||||
|
||||
<U extends T, T extends A>(x: U): U;
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 39, 5))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 39, 17))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 39, 17))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 39, 31))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 39, 5))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 39, 5))
|
||||
}
|
||||
var r3 = a().foo(); // error, no inferences for U so it doesn't satisfy constraint
|
||||
>r3 : Symbol(r3, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 41, 3))
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 37, 3))
|
||||
|
||||
var r3b = a()['foo']();
|
||||
>r3b : Symbol(r3b, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 42, 3))
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 37, 3))
|
||||
|
||||
// parameter supplied for type argument inference for U
|
||||
var r3c = a(new B()).foo(); // valid call to an invalid function, U is inferred as B, which has a foo
|
||||
>r3c : Symbol(r3c, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 44, 3))
|
||||
>a(new B()).foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 37, 3))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
>foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
var r3d = a(new B())['foo'](); // valid call to an invalid function, U is inferred as B, which has a foo
|
||||
>r3d : Symbol(r3d, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 45, 3))
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 37, 3))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
>'foo' : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
var b = {
|
||||
>b : Symbol(b, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 47, 3))
|
||||
|
||||
foo: <U extends A, T extends U>(x: T) => {
|
||||
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 47, 9))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 10))
|
||||
>A : Symbol(A, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 22))
|
||||
>U : Symbol(U, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 10))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 36))
|
||||
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 22))
|
||||
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 50, 11))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 36))
|
||||
>'foo' : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
|
||||
return a + x.foo();
|
||||
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 50, 11))
|
||||
>x.foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 48, 36))
|
||||
>foo : Symbol(A.foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 2, 9))
|
||||
}
|
||||
}
|
||||
|
||||
var r4 = b.foo(new B()); // valid call to an invalid function
|
||||
>r4 : Symbol(r4, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 55, 3))
|
||||
>b.foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 47, 9))
|
||||
>b : Symbol(b, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 47, 3))
|
||||
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 47, 9))
|
||||
>B : Symbol(B, Decl(propertyAccessOnTypeParameterWithConstraints3.ts, 4, 1))
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
=== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts ===
|
||||
// generic types should behave as if they have properties of their constraint type
|
||||
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
foo(): string { return ''; }
|
||||
>foo : () => string
|
||||
>'' : string
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
>B : B
|
||||
>A : A
|
||||
|
||||
bar(): string {
|
||||
>bar : () => string
|
||||
|
||||
return '';
|
||||
>'' : string
|
||||
}
|
||||
}
|
||||
|
||||
class C<U extends A, T extends U> {
|
||||
>C : C<U, T>
|
||||
>U : U
|
||||
>A : A
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
f() {
|
||||
>f : () => string
|
||||
|
||||
var x: T;
|
||||
>x : T
|
||||
>T : T
|
||||
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
>a : string
|
||||
>x['foo']() : string
|
||||
>x['foo'] : () => string
|
||||
>x : T
|
||||
>'foo' : string
|
||||
|
||||
return a + x.foo();
|
||||
>a + x.foo() : string
|
||||
>a : string
|
||||
>x.foo() : string
|
||||
>x.foo : () => string
|
||||
>x : T
|
||||
>foo : () => string
|
||||
}
|
||||
|
||||
g(x: U) {
|
||||
>g : (x: U) => string
|
||||
>x : U
|
||||
>U : U
|
||||
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
>a : string
|
||||
>x['foo']() : string
|
||||
>x['foo'] : () => string
|
||||
>x : U
|
||||
>'foo' : string
|
||||
|
||||
return a + x.foo();
|
||||
>a + x.foo() : string
|
||||
>a : string
|
||||
>x.foo() : string
|
||||
>x.foo : () => string
|
||||
>x : U
|
||||
>foo : () => string
|
||||
}
|
||||
}
|
||||
|
||||
var r1a = (new C<A, B>()).f();
|
||||
>r1a : string
|
||||
>(new C<A, B>()).f() : string
|
||||
>(new C<A, B>()).f : () => string
|
||||
>(new C<A, B>()) : C<A, B>
|
||||
>new C<A, B>() : C<A, B>
|
||||
>C : typeof C
|
||||
>A : A
|
||||
>B : B
|
||||
>f : () => string
|
||||
|
||||
var r1b = (new C<A, B>()).g(new B());
|
||||
>r1b : string
|
||||
>(new C<A, B>()).g(new B()) : string
|
||||
>(new C<A, B>()).g : (x: A) => string
|
||||
>(new C<A, B>()) : C<A, B>
|
||||
>new C<A, B>() : C<A, B>
|
||||
>C : typeof C
|
||||
>A : A
|
||||
>B : B
|
||||
>g : (x: A) => string
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
|
||||
interface I<U extends A, T extends U> {
|
||||
>I : I<U, T>
|
||||
>U : U
|
||||
>A : A
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
foo: T;
|
||||
>foo : T
|
||||
>T : T
|
||||
}
|
||||
var i: I<A, B>;
|
||||
>i : I<A, B>
|
||||
>I : I<U, T>
|
||||
>A : A
|
||||
>B : B
|
||||
|
||||
var r2 = i.foo.foo();
|
||||
>r2 : string
|
||||
>i.foo.foo() : string
|
||||
>i.foo.foo : () => string
|
||||
>i.foo : B
|
||||
>i : I<A, B>
|
||||
>foo : B
|
||||
>foo : () => string
|
||||
|
||||
var r2b = i.foo['foo']();
|
||||
>r2b : string
|
||||
>i.foo['foo']() : string
|
||||
>i.foo['foo'] : () => string
|
||||
>i.foo : B
|
||||
>i : I<A, B>
|
||||
>foo : B
|
||||
>'foo' : string
|
||||
|
||||
var a: {
|
||||
>a : { <U extends A, T extends U>(): T; <U extends T, T extends A>(x: U): U; }
|
||||
|
||||
<U extends A, T extends U>(): T;
|
||||
>U : U
|
||||
>A : A
|
||||
>T : T
|
||||
>U : U
|
||||
>T : T
|
||||
|
||||
<U extends T, T extends A>(x: U): U;
|
||||
>U : U
|
||||
>T : T
|
||||
>T : T
|
||||
>A : A
|
||||
>x : U
|
||||
>U : U
|
||||
>U : U
|
||||
}
|
||||
var r3 = a().foo(); // error, no inferences for U so it doesn't satisfy constraint
|
||||
>r3 : any
|
||||
>a().foo() : any
|
||||
>a().foo : any
|
||||
>a() : any
|
||||
>a : { <U extends A, T extends U>(): T; <U extends T, T extends A>(x: U): U; }
|
||||
>foo : any
|
||||
|
||||
var r3b = a()['foo']();
|
||||
>r3b : any
|
||||
>a()['foo']() : any
|
||||
>a()['foo'] : any
|
||||
>a() : any
|
||||
>a : { <U extends A, T extends U>(): T; <U extends T, T extends A>(x: U): U; }
|
||||
>'foo' : string
|
||||
|
||||
// parameter supplied for type argument inference for U
|
||||
var r3c = a(new B()).foo(); // valid call to an invalid function, U is inferred as B, which has a foo
|
||||
>r3c : string
|
||||
>a(new B()).foo() : string
|
||||
>a(new B()).foo : () => string
|
||||
>a(new B()) : B
|
||||
>a : { <U extends A, T extends U>(): T; <U extends T, T extends A>(x: U): U; }
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
>foo : () => string
|
||||
|
||||
var r3d = a(new B())['foo'](); // valid call to an invalid function, U is inferred as B, which has a foo
|
||||
>r3d : string
|
||||
>a(new B())['foo']() : string
|
||||
>a(new B())['foo'] : () => string
|
||||
>a(new B()) : B
|
||||
>a : { <U extends A, T extends U>(): T; <U extends T, T extends A>(x: U): U; }
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
>'foo' : string
|
||||
|
||||
var b = {
|
||||
>b : { foo: <U extends A, T extends U>(x: T) => string; }
|
||||
>{ foo: <U extends A, T extends U>(x: T) => { // BUG 823818 var a = x['foo'](); // should be string return a + x.foo(); }} : { foo: <U extends A, T extends U>(x: T) => string; }
|
||||
|
||||
foo: <U extends A, T extends U>(x: T) => {
|
||||
>foo : <U extends A, T extends U>(x: T) => string
|
||||
><U extends A, T extends U>(x: T) => { // BUG 823818 var a = x['foo'](); // should be string return a + x.foo(); } : <U extends A, T extends U>(x: T) => string
|
||||
>U : U
|
||||
>A : A
|
||||
>T : T
|
||||
>U : U
|
||||
>x : T
|
||||
>T : T
|
||||
|
||||
// BUG 823818
|
||||
var a = x['foo'](); // should be string
|
||||
>a : string
|
||||
>x['foo']() : string
|
||||
>x['foo'] : () => string
|
||||
>x : T
|
||||
>'foo' : string
|
||||
|
||||
return a + x.foo();
|
||||
>a + x.foo() : string
|
||||
>a : string
|
||||
>x.foo() : string
|
||||
>x.foo : () => string
|
||||
>x : T
|
||||
>foo : () => string
|
||||
}
|
||||
}
|
||||
|
||||
var r4 = b.foo(new B()); // valid call to an invalid function
|
||||
>r4 : string
|
||||
>b.foo(new B()) : string
|
||||
>b.foo : <U extends A, T extends U>(x: T) => string
|
||||
>b : { foo: <U extends A, T extends U>(x: T) => string; }
|
||||
>foo : <U extends A, T extends U>(x: T) => string
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(11,9): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(21,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(15,32): error TS2339: Property 'notHere' does not exist on type 'U'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(25,16): error TS2339: Property 'notHere' does not exist on type 'B'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(29,6): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(32,22): error TS2339: Property 'notHere' does not exist on type '{}'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(36,11): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(38,16): error TS2322: Type 'string' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts(38,22): error TS2339: Property 'notHere' does not exist on type 'U'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts (6 errors) ====
|
||||
==== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts (4 errors) ====
|
||||
class A {
|
||||
foo(): string { return ''; }
|
||||
}
|
||||
@@ -18,20 +16,18 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOn
|
||||
}
|
||||
|
||||
class C<U extends T, T extends A> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
f() {
|
||||
var x: U;
|
||||
var a = x['foo'](); // should be string
|
||||
return a + x.foo() + x.notHere();
|
||||
~~~~~~~
|
||||
!!! error TS2339: Property 'notHere' does not exist on type 'U'.
|
||||
}
|
||||
}
|
||||
|
||||
var r = (new C<B, A>()).f();
|
||||
|
||||
interface I<U extends T, T extends A> {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
foo: U;
|
||||
}
|
||||
var i: I<B, A>;
|
||||
@@ -42,21 +38,19 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOn
|
||||
|
||||
var a: {
|
||||
<U extends T, T extends A>(): U;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
}
|
||||
// BUG 794164
|
||||
var r3: string = a().notHere();
|
||||
~~~~~~~
|
||||
!!! error TS2339: Property 'notHere' does not exist on type '{}'.
|
||||
var r3b: string = a()['foo']();
|
||||
|
||||
var b = {
|
||||
foo: <U extends T, T extends A>(x: U): U => {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
var a = x['foo'](); // should be string
|
||||
return a + x.notHere();
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'U'.
|
||||
~~~~~~~
|
||||
!!! error TS2339: Property 'notHere' does not exist on type 'U'.
|
||||
},
|
||||
// BUG 794164
|
||||
bar: b.foo(1).notHere()
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(2,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(2,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(3,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/recursiveGenericTypeHierarchy.ts(3,32): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveGenericTypeHierarchy.ts (4 errors) ====
|
||||
// used to ICE
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
@@ -0,0 +1,31 @@
|
||||
=== tests/cases/compiler/recursiveGenericTypeHierarchy.ts ===
|
||||
// used to ICE
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
>A : Symbol(A, Decl(recursiveGenericTypeHierarchy.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 1, 12))
|
||||
>A : Symbol(A, Decl(recursiveGenericTypeHierarchy.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 1, 12))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 1, 30))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 1, 30))
|
||||
>A : Symbol(A, Decl(recursiveGenericTypeHierarchy.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 1, 12))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 1, 30))
|
||||
|
||||
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
|
||||
>B : Symbol(B, Decl(recursiveGenericTypeHierarchy.ts, 1, 53))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 2, 12))
|
||||
>B : Symbol(B, Decl(recursiveGenericTypeHierarchy.ts, 1, 53))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 2, 12))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 2, 30))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 2, 30))
|
||||
>B : Symbol(B, Decl(recursiveGenericTypeHierarchy.ts, 1, 53))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 2, 12))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 2, 30))
|
||||
>A : Symbol(A, Decl(recursiveGenericTypeHierarchy.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(recursiveGenericTypeHierarchy.ts, 1, 53))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 2, 12))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 2, 30))
|
||||
>B : Symbol(B, Decl(recursiveGenericTypeHierarchy.ts, 1, 53))
|
||||
>T : Symbol(T, Decl(recursiveGenericTypeHierarchy.ts, 2, 12))
|
||||
>S : Symbol(S, Decl(recursiveGenericTypeHierarchy.ts, 2, 30))
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
=== tests/cases/compiler/recursiveGenericTypeHierarchy.ts ===
|
||||
// used to ICE
|
||||
interface A<T extends A<T, S>, S extends A<T, S>> { }
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>S : S
|
||||
>A : A<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
|
||||
interface B<T extends B<T, S>, S extends B<T, S>> extends A<B<T, S>, B<T, S>> { }
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>S : S
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>A : A<T, S>
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
>B : B<T, S>
|
||||
>T : T
|
||||
>S : S
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user