Skip to content

Commit f2d9663

Browse files
WIP
1 parent 52b9533 commit f2d9663

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/compiler/issues/2989.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
let value: i32 = 0;
3+
4+
function logA(x: i32):void {
5+
value = 100;
6+
}
7+
8+
function logB(x: i32):void {
9+
value = 200;
10+
}
11+
12+
let fn = logA;
13+
14+
function foo(x: i32):i32 {
15+
fn = logB;
16+
return x;
17+
}
18+
19+
fn(foo(42));
20+
assert(value == 100);

0 commit comments

Comments
 (0)