TypeScript/tests/baselines/reference/constructorImplementationWithDefaultValues.types
2015-04-13 14:29:37 -07:00

54 lines
2 KiB
Plaintext

=== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts ===
class C {
>C : C, Symbol(C, Decl(constructorImplementationWithDefaultValues.ts, 0, 0))
constructor(x);
>x : any, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 1, 16))
constructor(x = 1) {
>x : number, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 2, 16))
>1 : number
var y = x;
>y : number, Symbol(y, Decl(constructorImplementationWithDefaultValues.ts, 3, 11))
>x : number, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 2, 16))
}
}
class D<T> {
>D : D<T>, Symbol(D, Decl(constructorImplementationWithDefaultValues.ts, 5, 1))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 7, 8))
constructor(x);
>x : any, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 8, 16))
constructor(x:T = null) {
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 9, 16))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 7, 8))
>null : null
var y = x;
>y : T, Symbol(y, Decl(constructorImplementationWithDefaultValues.ts, 10, 11))
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 9, 16))
}
}
class E<T extends Date> {
>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))
constructor(x);
>x : any, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 15, 16))
constructor(x: T = null) {
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 16, 16))
>T : T, Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 14, 8))
>null : null
var y = x;
>y : T, Symbol(y, Decl(constructorImplementationWithDefaultValues.ts, 17, 11))
>x : T, Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 16, 16))
}
}