67 lines
1 KiB
Text
67 lines
1 KiB
Text
=== tests/cases/compiler/privateInstanceVisibility.ts ===
|
|
module Test {
|
|
>Test : typeof Test
|
|
|
|
export class Example {
|
|
>Example : Example
|
|
|
|
private someNumber: number;
|
|
>someNumber : number
|
|
|
|
|
|
|
|
public doSomething() {
|
|
>doSomething : () => void
|
|
|
|
var that = this;
|
|
>that : Example
|
|
>this : Example
|
|
|
|
function innerFunction() {
|
|
>innerFunction : () => void
|
|
|
|
var num = that.someNumber;
|
|
>num : number
|
|
>that.someNumber : number
|
|
>that : Example
|
|
>someNumber : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class C {
|
|
>C : C
|
|
|
|
private x: number;
|
|
>x : number
|
|
|
|
getX() { return this.x; }
|
|
>getX : () => number
|
|
>this.x : number
|
|
>this : C
|
|
>x : number
|
|
|
|
clone(other: C) {
|
|
>clone : (other: C) => void
|
|
>other : C
|
|
>C : C
|
|
|
|
this.x = other.x;
|
|
>this.x = other.x : number
|
|
>this.x : number
|
|
>this : C
|
|
>x : number
|
|
>other.x : number
|
|
>other : C
|
|
>x : number
|
|
|
|
}
|
|
}
|
|
|