Skip to content

Commit c67ab51

Browse files
committed
add tests for exception tracking on externals
1 parent 40c51a5 commit c67ab51

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/analysis_tests/tests-reanalyze/deadcode/expected/exception.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,9 @@
9191
Exception Analysis
9292
ExnA.res:1:5-7
9393
bar might raise Not_found (ExnA.res:1:16) and is not annotated with @raises(Not_found)
94+
95+
Exception Analysis
96+
ExternalTest.res:7:5-24
97+
bigIntFromStringExn2 might raise Exn.Error (ExternalTest.res:7:35) and is not annotated with @raises(Exn.Error)
9498

95-
Analysis reported 23 issues (Exception Analysis:23)
99+
Analysis reported 24 issues (Exception Analysis:24)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@raises(Exn.Error)
2+
external bigIntFromStringExn: string => bigint = "BigInt"
3+
4+
@raises(Exn.Error)
5+
let bigIntFromStringExn = s => s->bigIntFromStringExn
6+
7+
let bigIntFromStringExn2 = s => s->bigIntFromStringExn

0 commit comments

Comments
 (0)