2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/selfInLambdas.ts ===
|
|
|
|
interface MouseEvent {
|
2015-04-13 23:01:57 +02:00
|
|
|
>MouseEvent : MouseEvent, Symbol(MouseEvent, Decl(selfInLambdas.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
x: number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(selfInLambdas.ts, 0, 22))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
y: number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : number, Symbol(y, Decl(selfInLambdas.ts, 1, 14))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var window: Window;
|
2015-04-13 23:01:57 +02:00
|
|
|
>window : Window, Symbol(window, Decl(selfInLambdas.ts, 5, 11))
|
|
|
|
>Window : Window, Symbol(Window, Decl(selfInLambdas.ts, 5, 27))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface Window {
|
2015-04-13 23:01:57 +02:00
|
|
|
>Window : Window, Symbol(Window, Decl(selfInLambdas.ts, 5, 27))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
onmousemove: (ev: MouseEvent) => any;
|
2015-04-13 23:01:57 +02:00
|
|
|
>onmousemove : (ev: MouseEvent) => any, Symbol(onmousemove, Decl(selfInLambdas.ts, 6, 18))
|
|
|
|
>ev : MouseEvent, Symbol(ev, Decl(selfInLambdas.ts, 7, 18))
|
|
|
|
>MouseEvent : MouseEvent, Symbol(MouseEvent, Decl(selfInLambdas.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
var o = {
|
2015-04-13 23:01:57 +02:00
|
|
|
>o : { counter: number; start: () => void; }, Symbol(o, Decl(selfInLambdas.ts, 10, 3))
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ counter: 0, start: function() { window.onmousemove = () => { this.counter++ var f = () => this.counter; } }} : { counter: number; start: () => void; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
counter: 0,
|
2015-04-13 23:01:57 +02:00
|
|
|
>counter : number, Symbol(counter, Decl(selfInLambdas.ts, 10, 9))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
start: function() {
|
2015-04-13 23:01:57 +02:00
|
|
|
>start : () => void, Symbol(start, Decl(selfInLambdas.ts, 12, 15))
|
2014-08-22 03:39:46 +02:00
|
|
|
>function() { window.onmousemove = () => { this.counter++ var f = () => this.counter; } } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
window.onmousemove = () => {
|
2014-08-22 03:39:46 +02:00
|
|
|
>window.onmousemove = () => { this.counter++ var f = () => this.counter; } : () => void
|
2015-04-13 23:01:57 +02:00
|
|
|
>window.onmousemove : (ev: MouseEvent) => any, Symbol(Window.onmousemove, Decl(selfInLambdas.ts, 6, 18))
|
|
|
|
>window : Window, Symbol(window, Decl(selfInLambdas.ts, 5, 11))
|
|
|
|
>onmousemove : (ev: MouseEvent) => any, Symbol(Window.onmousemove, Decl(selfInLambdas.ts, 6, 18))
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { this.counter++ var f = () => this.counter; } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
this.counter++
|
|
|
|
>this.counter++ : number
|
|
|
|
>this.counter : any
|
|
|
|
>this : any
|
|
|
|
>counter : any
|
|
|
|
|
|
|
|
var f = () => this.counter;
|
2015-04-13 23:01:57 +02:00
|
|
|
>f : () => any, Symbol(f, Decl(selfInLambdas.ts, 18, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
>() => this.counter : () => any
|
|
|
|
>this.counter : any
|
|
|
|
>this : any
|
|
|
|
>counter : any
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class X {
|
2015-04-13 23:01:57 +02:00
|
|
|
>X : X, Symbol(X, Decl(selfInLambdas.ts, 24, 1))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
private value = "value";
|
2015-04-13 23:01:57 +02:00
|
|
|
>value : string, Symbol(value, Decl(selfInLambdas.ts, 28, 9))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"value" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
public foo() {
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : () => void, Symbol(foo, Decl(selfInLambdas.ts, 29, 25))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var outer= () => {
|
2015-04-13 23:01:57 +02:00
|
|
|
>outer : () => void, Symbol(outer, Decl(selfInLambdas.ts, 32, 5))
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { var x = this.value; var inner = () => { var y = this.value; } inner(); } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var x = this.value;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(selfInLambdas.ts, 33, 15))
|
|
|
|
>this.value : string, Symbol(value, Decl(selfInLambdas.ts, 28, 9))
|
|
|
|
>this : X, Symbol(X, Decl(selfInLambdas.ts, 24, 1))
|
|
|
|
>value : string, Symbol(value, Decl(selfInLambdas.ts, 28, 9))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var inner = () => {
|
2015-04-13 23:01:57 +02:00
|
|
|
>inner : () => void, Symbol(inner, Decl(selfInLambdas.ts, 34, 15))
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { var y = this.value; } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var y = this.value;
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(selfInLambdas.ts, 35, 19))
|
|
|
|
>this.value : string, Symbol(value, Decl(selfInLambdas.ts, 28, 9))
|
|
|
|
>this : X, Symbol(X, Decl(selfInLambdas.ts, 24, 1))
|
|
|
|
>value : string, Symbol(value, Decl(selfInLambdas.ts, 28, 9))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inner();
|
|
|
|
>inner() : void
|
2015-04-13 23:01:57 +02:00
|
|
|
>inner : () => void, Symbol(inner, Decl(selfInLambdas.ts, 34, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
outer();
|
|
|
|
>outer() : void
|
2015-04-13 23:01:57 +02:00
|
|
|
>outer : () => void, Symbol(outer, Decl(selfInLambdas.ts, 32, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|