Skip to content

Commit 99743df

Browse files
committed
Add basic test case
1 parent 94aeff2 commit 99743df

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/cases/compiler/recursion.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let o = {
2+
p: 12,
3+
m(this: typeof o) {
4+
return this.p;
5+
}
6+
}
7+
let o2 = {
8+
p: 12,
9+
m() {
10+
let x: typeof o2;
11+
let y = this.p // nope, any
12+
return x.p // ok???
13+
}
14+
m2() {
15+
return this.m() // still any!
16+
}
17+
}
18+
19+
let x = o2.m()
20+
let y = o2.m2()
21+
let p = o2.p

0 commit comments

Comments
 (0)