TypeScript/tests/baselines/reference/forStatements.types

165 lines
6.5 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/statements/forStatements/forStatements.ts ===
interface I {
2015-04-13 23:01:57 +02:00
>I : I, Symbol(I, Decl(forStatements.ts, 0, 0))
2014-08-15 23:33:16 +02:00
id: number;
2015-04-13 23:01:57 +02:00
>id : number, Symbol(id, Decl(forStatements.ts, 0, 13))
2014-08-15 23:33:16 +02:00
}
class C implements I {
2015-04-13 23:01:57 +02:00
>C : C, Symbol(C, Decl(forStatements.ts, 2, 1))
>I : I, Symbol(I, Decl(forStatements.ts, 0, 0))
2014-08-15 23:33:16 +02:00
id: number;
2015-04-13 23:01:57 +02:00
>id : number, Symbol(id, Decl(forStatements.ts, 4, 22))
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(forStatements.ts, 6, 1))
>T : T, Symbol(T, Decl(forStatements.ts, 8, 8))
2014-08-15 23:33:16 +02:00
source: T;
2015-04-13 23:01:57 +02:00
>source : T, Symbol(source, Decl(forStatements.ts, 8, 11))
>T : T, Symbol(T, Decl(forStatements.ts, 8, 8))
2014-08-15 23:33:16 +02:00
recurse: D<T>;
2015-04-13 23:01:57 +02:00
>recurse : D<T>, Symbol(recurse, Decl(forStatements.ts, 9, 14))
>D : D<T>, Symbol(D, Decl(forStatements.ts, 6, 1))
>T : T, Symbol(T, Decl(forStatements.ts, 8, 8))
2014-08-15 23:33:16 +02:00
wrapped: D<D<T>>
2015-04-13 23:01:57 +02:00
>wrapped : D<D<T>>, Symbol(wrapped, Decl(forStatements.ts, 10, 18))
>D : D<T>, Symbol(D, Decl(forStatements.ts, 6, 1))
>D : D<T>, Symbol(D, Decl(forStatements.ts, 6, 1))
>T : T, Symbol(T, Decl(forStatements.ts, 8, 8))
2014-08-15 23:33:16 +02:00
}
function F(x: string): number { return 42; }
2015-04-13 23:01:57 +02:00
>F : (x: string) => number, Symbol(F, Decl(forStatements.ts, 12, 1))
>x : string, Symbol(x, Decl(forStatements.ts, 14, 11))
2015-04-13 21:36:11 +02:00
>42 : number
2014-08-15 23:33:16 +02:00
module M {
2015-04-13 23:01:57 +02:00
>M : typeof M, Symbol(M, Decl(forStatements.ts, 14, 44))
2014-08-15 23:33:16 +02:00
export class A {
2015-04-13 23:01:57 +02:00
>A : A, Symbol(A, Decl(forStatements.ts, 16, 10))
2014-08-15 23:33:16 +02:00
name: string;
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(forStatements.ts, 17, 20))
2014-08-15 23:33:16 +02:00
}
export function F2(x: number): string { return x.toString(); }
2015-04-13 23:01:57 +02:00
>F2 : (x: number) => string, Symbol(F2, Decl(forStatements.ts, 19, 5))
>x : number, Symbol(x, Decl(forStatements.ts, 21, 23))
2014-08-15 23:33:16 +02:00
>x.toString() : string
2015-04-13 23:01:57 +02:00
>x.toString : (radix?: number) => string, Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
>x : number, Symbol(x, Decl(forStatements.ts, 21, 23))
>toString : (radix?: number) => string, Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
2014-08-15 23:33:16 +02:00
}
for(var aNumber: number = 9.9;;){}
2015-04-13 23:01:57 +02:00
>aNumber : number, Symbol(aNumber, Decl(forStatements.ts, 24, 7))
2015-04-13 21:36:11 +02:00
>9.9 : number
2014-08-15 23:33:16 +02:00
for(var aString: string = 'this is a string';;){}
2015-04-13 23:01:57 +02:00
>aString : string, Symbol(aString, Decl(forStatements.ts, 25, 7))
2015-04-13 21:36:11 +02:00
>'this is a string' : string
2014-08-15 23:33:16 +02:00
for(var aDate: Date = new Date(12);;){}
2015-04-13 23:01:57 +02:00
>aDate : Date, Symbol(aDate, Decl(forStatements.ts, 26, 7))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-08-15 23:33:16 +02:00
>new Date(12) : Date
2015-04-13 23:01:57 +02:00
>Date : DateConstructor, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2015-04-13 21:36:11 +02:00
>12 : number
2014-08-15 23:33:16 +02:00
for(var anObject: Object = new Object();;){}
2015-04-13 23:01:57 +02:00
>anObject : Object, Symbol(anObject, Decl(forStatements.ts, 27, 7))
>Object : Object, Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11))
2014-08-15 23:33:16 +02:00
>new Object() : Object
2015-04-13 23:01:57 +02:00
>Object : ObjectConstructor, Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11))
2014-08-15 23:33:16 +02:00
for(var anAny: any = null;;){}
2015-04-13 23:01:57 +02:00
>anAny : any, Symbol(anAny, Decl(forStatements.ts, 29, 7))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
for(var aSecondAny: any = undefined;;){}
2015-04-13 23:01:57 +02:00
>aSecondAny : any, Symbol(aSecondAny, Decl(forStatements.ts, 30, 7))
>undefined : undefined, Symbol(undefined)
2014-08-15 23:33:16 +02:00
for(var aVoid: void = undefined;;){}
2015-04-13 23:01:57 +02:00
>aVoid : void, Symbol(aVoid, Decl(forStatements.ts, 31, 7))
>undefined : undefined, Symbol(undefined)
2014-08-15 23:33:16 +02:00
for(var anInterface: I = new C();;){}
2015-04-13 23:01:57 +02:00
>anInterface : I, Symbol(anInterface, Decl(forStatements.ts, 33, 7))
>I : I, Symbol(I, Decl(forStatements.ts, 0, 0))
2014-08-15 23:33:16 +02:00
>new C() : C
2015-04-13 23:01:57 +02:00
>C : typeof C, Symbol(C, Decl(forStatements.ts, 2, 1))
2014-08-15 23:33:16 +02:00
for(var aClass: C = new C();;){}
2015-04-13 23:01:57 +02:00
>aClass : C, Symbol(aClass, Decl(forStatements.ts, 34, 7))
>C : C, Symbol(C, Decl(forStatements.ts, 2, 1))
2014-08-15 23:33:16 +02:00
>new C() : C
2015-04-13 23:01:57 +02:00
>C : typeof C, Symbol(C, Decl(forStatements.ts, 2, 1))
2014-08-15 23:33:16 +02:00
for(var aGenericClass: D<string> = new D<string>();;){}
2015-04-13 23:01:57 +02:00
>aGenericClass : D<string>, Symbol(aGenericClass, Decl(forStatements.ts, 35, 7))
>D : D<T>, Symbol(D, Decl(forStatements.ts, 6, 1))
2014-08-15 23:33:16 +02:00
>new D<string>() : D<string>
2015-04-13 23:01:57 +02:00
>D : typeof D, Symbol(D, Decl(forStatements.ts, 6, 1))
2014-08-15 23:33:16 +02:00
for(var anObjectLiteral: I = { id: 12 };;){}
2015-04-13 23:01:57 +02:00
>anObjectLiteral : I, Symbol(anObjectLiteral, Decl(forStatements.ts, 36, 7))
>I : I, Symbol(I, Decl(forStatements.ts, 0, 0))
2014-08-15 23:33:16 +02:00
>{ id: 12 } : { id: number; }
2015-04-13 23:01:57 +02:00
>id : number, Symbol(id, Decl(forStatements.ts, 36, 30))
2015-04-13 21:36:11 +02:00
>12 : number
2014-08-15 23:33:16 +02:00
for(var anOtherObjectLiteral: { id: number } = new C();;){}
2015-04-13 23:01:57 +02:00
>anOtherObjectLiteral : { id: number; }, Symbol(anOtherObjectLiteral, Decl(forStatements.ts, 37, 7))
>id : number, Symbol(id, Decl(forStatements.ts, 37, 31))
2014-08-15 23:33:16 +02:00
>new C() : C
2015-04-13 23:01:57 +02:00
>C : typeof C, Symbol(C, Decl(forStatements.ts, 2, 1))
2014-08-15 23:33:16 +02:00
for(var aFunction: typeof F = F;;){}
2015-04-13 23:01:57 +02:00
>aFunction : (x: string) => number, Symbol(aFunction, Decl(forStatements.ts, 39, 7))
>F : (x: string) => number, Symbol(F, Decl(forStatements.ts, 12, 1))
>F : (x: string) => number, Symbol(F, Decl(forStatements.ts, 12, 1))
2014-08-15 23:33:16 +02:00
for(var anOtherFunction: (x: string) => number = F;;){}
2015-04-13 23:01:57 +02:00
>anOtherFunction : (x: string) => number, Symbol(anOtherFunction, Decl(forStatements.ts, 40, 7))
>x : string, Symbol(x, Decl(forStatements.ts, 40, 26))
>F : (x: string) => number, Symbol(F, Decl(forStatements.ts, 12, 1))
2014-08-15 23:33:16 +02:00
for(var aLambda: typeof F = (x) => 2;;){}
2015-04-13 23:01:57 +02:00
>aLambda : (x: string) => number, Symbol(aLambda, Decl(forStatements.ts, 41, 7))
>F : (x: string) => number, Symbol(F, Decl(forStatements.ts, 12, 1))
2014-08-15 23:33:16 +02:00
>(x) => 2 : (x: string) => number
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(forStatements.ts, 41, 29))
2015-04-13 21:36:11 +02:00
>2 : number
2014-08-15 23:33:16 +02:00
for(var aModule: typeof M = M;;){}
2015-04-13 23:01:57 +02:00
>aModule : typeof M, Symbol(aModule, Decl(forStatements.ts, 43, 7))
>M : typeof M, Symbol(M, Decl(forStatements.ts, 14, 44))
>M : typeof M, Symbol(M, Decl(forStatements.ts, 14, 44))
2014-08-15 23:33:16 +02:00
for(var aClassInModule: M.A = new M.A();;){}
2015-04-13 23:01:57 +02:00
>aClassInModule : M.A, Symbol(aClassInModule, Decl(forStatements.ts, 44, 7))
>M : any, Symbol(M, Decl(forStatements.ts, 14, 44))
>A : M.A, Symbol(M.A, Decl(forStatements.ts, 16, 10))
2014-08-25 19:36:12 +02:00
>new M.A() : M.A
2015-04-13 23:01:57 +02:00
>M.A : typeof M.A, Symbol(M.A, Decl(forStatements.ts, 16, 10))
>M : typeof M, Symbol(M, Decl(forStatements.ts, 14, 44))
>A : typeof M.A, Symbol(M.A, Decl(forStatements.ts, 16, 10))
2014-08-15 23:33:16 +02:00
for(var aFunctionInModule: typeof M.F2 = (x) => 'this is a string';;){}
2015-04-13 23:01:57 +02:00
>aFunctionInModule : (x: number) => string, Symbol(aFunctionInModule, Decl(forStatements.ts, 45, 7))
>M.F2 : (x: number) => string, Symbol(M.F2, Decl(forStatements.ts, 19, 5))
>M : typeof M, Symbol(M, Decl(forStatements.ts, 14, 44))
>F2 : (x: number) => string, Symbol(M.F2, Decl(forStatements.ts, 19, 5))
2014-08-15 23:33:16 +02:00
>(x) => 'this is a string' : (x: number) => string
2015-04-13 23:01:57 +02:00
>x : number, Symbol(x, Decl(forStatements.ts, 45, 42))
2015-04-13 21:36:11 +02:00
>'this is a string' : string
2014-08-15 23:33:16 +02:00