TypeScript/tests/baselines/reference/privateInstanceVisibility.types

68 lines
2.5 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/privateInstanceVisibility.ts ===
module Test {
2015-04-13 23:01:57 +02:00
>Test : typeof Test, Symbol(Test, Decl(privateInstanceVisibility.ts, 0, 0))
2014-08-15 23:33:16 +02:00
export class Example {
2015-04-13 23:01:57 +02:00
>Example : Example, Symbol(Example, Decl(privateInstanceVisibility.ts, 0, 13))
2014-08-15 23:33:16 +02:00
private someNumber: number;
2015-04-13 23:01:57 +02:00
>someNumber : number, Symbol(someNumber, Decl(privateInstanceVisibility.ts, 2, 26))
2014-08-15 23:33:16 +02:00
public doSomething() {
2015-04-13 23:01:57 +02:00
>doSomething : () => void, Symbol(doSomething, Decl(privateInstanceVisibility.ts, 4, 35))
2014-08-15 23:33:16 +02:00
var that = this;
2015-04-13 23:01:57 +02:00
>that : Example, Symbol(that, Decl(privateInstanceVisibility.ts, 10, 15))
>this : Example, Symbol(Example, Decl(privateInstanceVisibility.ts, 0, 13))
2014-08-15 23:33:16 +02:00
function innerFunction() {
2015-04-13 23:01:57 +02:00
>innerFunction : () => void, Symbol(innerFunction, Decl(privateInstanceVisibility.ts, 10, 28))
2014-08-15 23:33:16 +02:00
var num = that.someNumber;
2015-04-13 23:01:57 +02:00
>num : number, Symbol(num, Decl(privateInstanceVisibility.ts, 14, 19))
>that.someNumber : number, Symbol(someNumber, Decl(privateInstanceVisibility.ts, 2, 26))
>that : Example, Symbol(that, Decl(privateInstanceVisibility.ts, 10, 15))
>someNumber : number, Symbol(someNumber, Decl(privateInstanceVisibility.ts, 2, 26))
2014-08-15 23:33:16 +02:00
}
}
}
}
class C {
2015-04-13 23:01:57 +02:00
>C : C, Symbol(C, Decl(privateInstanceVisibility.ts, 22, 1))
2014-08-15 23:33:16 +02:00
private x: number;
2015-04-13 23:01:57 +02:00
>x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
2014-08-15 23:33:16 +02:00
getX() { return this.x; }
2015-04-13 23:01:57 +02:00
>getX : () => number, Symbol(getX, Decl(privateInstanceVisibility.ts, 28, 22))
>this.x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
>this : C, Symbol(C, Decl(privateInstanceVisibility.ts, 22, 1))
>x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
2014-08-15 23:33:16 +02:00
clone(other: C) {
2015-04-13 23:01:57 +02:00
>clone : (other: C) => void, Symbol(clone, Decl(privateInstanceVisibility.ts, 30, 29))
>other : C, Symbol(other, Decl(privateInstanceVisibility.ts, 32, 10))
>C : C, Symbol(C, Decl(privateInstanceVisibility.ts, 22, 1))
2014-08-15 23:33:16 +02:00
this.x = other.x;
>this.x = other.x : number
2015-04-13 23:01:57 +02:00
>this.x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
>this : C, Symbol(C, Decl(privateInstanceVisibility.ts, 22, 1))
>x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
>other.x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
>other : C, Symbol(other, Decl(privateInstanceVisibility.ts, 32, 10))
>x : number, Symbol(x, Decl(privateInstanceVisibility.ts, 26, 9))
2014-08-15 23:33:16 +02:00
}
}