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