TypeScript/tests/baselines/reference/constructorImplementationWithDefaultValues.types

54 lines
2 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts ===
class C {
2015-04-13 23:01:57 +02:00
>C : C, Symbol(C, Decl(constructorImplementationWithDefaultValues.ts, 0, 0))
2014-08-15 23:33:16 +02:00
constructor(x);
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 1, 16))
2014-08-15 23:33:16 +02:00
constructor(x = 1) {
2015-04-13 23:01:57 +02:00
>x : number, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 2, 16))
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
var y = x;
2015-04-13 23:01:57 +02:00
>y : number, Symbol(y, Decl(constructorImplementationWithDefaultValues.ts, 3, 11))
>x : number, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 2, 16))
2014-08-15 23:33:16 +02:00
}
}
class D<T> {
2015-04-13 23:01:57 +02:00
>D : D<T>, Symbol(D, Decl(constructorImplementationWithDefaultValues.ts, 5, 1))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 7, 8))
2014-08-15 23:33:16 +02:00
constructor(x);
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 8, 16))
2014-08-15 23:33:16 +02:00
constructor(x:T = null) {
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 9, 16))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 7, 8))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
var y = x;
2015-04-13 23:01:57 +02:00
>y : T, Symbol(y, Decl(constructorImplementationWithDefaultValues.ts, 10, 11))
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 9, 16))
2014-08-15 23:33:16 +02:00
}
}
class E<T extends Date> {
2015-04-13 23:01:57 +02:00
>E : E<T>, Symbol(E, Decl(constructorImplementationWithDefaultValues.ts, 12, 1))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 14, 8))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-08-15 23:33:16 +02:00
constructor(x);
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 15, 16))
2014-08-15 23:33:16 +02:00
constructor(x: T = null) {
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 16, 16))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 14, 8))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
var y = x;
2015-04-13 23:01:57 +02:00
>y : T, Symbol(y, Decl(constructorImplementationWithDefaultValues.ts, 17, 11))
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 16, 16))
2014-08-15 23:33:16 +02:00
}
}