Use `isAccessExpression` to cover both `PropertyAccess` and `ElementAccess`. Also use it in a few other places that used both explicitly. (And also fix a random weird formatting.) Fixes #32721.
18 lines
345 B
TypeScript
18 lines
345 B
TypeScript
// #32721
|
|
|
|
class Recursive1 {
|
|
constructor(private readonly parent?: Recursive1) {}
|
|
private depth: number = this.parent ? this.parent.depth + 1 : 0;
|
|
}
|
|
|
|
class Recursive2 {
|
|
parent!: Recursive2;
|
|
depth: number = this.parent.depth;
|
|
}
|
|
|
|
class Recursive3 {
|
|
parent!: Recursive3;
|
|
depth: number = this.parent.alpha;
|
|
alpha = 0;
|
|
}
|