Skip to content

Commit 6543d38

Browse files
committed
test(coverage): complex expressions
- ArrayLiteral Element - UnaryExpression - CastAs Expression Source - Assignment Chain - IndexAccess in Member Chain
1 parent 2b2521c commit 6543d38

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const obj = {
2+
arr: [1 + 1, 1 - 1];
3+
}
4+
const negSizeStr = -(~obj.arr) as string
5+
6+
>>> negSizeStr
7+
8+
const correctCast = negSizeStr == "-2"
9+
if (correctCast){
10+
let single = [0]
11+
let x = single[0] = obj.arr[2 - 2]
12+
>>> x
13+
}

0 commit comments

Comments
 (0)