Skip to content

Commit 3f12588

Browse files
Gburychambart
authored andcommitted
Add a test to check the specialization fails without type annotation
1 parent b98f97c commit 3f12588

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

testsuite/tests/flambda-specialization/polymorphic_compare.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ let[@inline never] test_ge (x:float) y = test_aux_ge x y
5353
let[@inline never] test_eq (x:float) y = test_aux_eq x y
5454
let[@inline never] test_ne (x:float) y = test_aux_ne x y
5555
let[@inline never] test_cmp (x:float) y = test_aux_cmp x y
56+
let[@inline never] test_fail x y = test_aux_cmp x y
5657

5758
let () =
5859
check_no_alloc __LINE__ test_lt 5. 1. (Some 1);
@@ -62,5 +63,6 @@ let () =
6263
check_no_alloc __LINE__ test_eq 5. 1. (Some 1);
6364
check_no_alloc __LINE__ test_ne 5. 1. (Some 1);
6465
check_no_alloc __LINE__ test_cmp 5. 1. (Some 1);
66+
check_no_alloc __LINE__ test_fail () () (Some 1);
6567
()
6668

testsuite/tests/flambda-specialization/polymorphic_compare.reference

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ OK
55
OK
66
OK
77
OK
8+
KO at line 66

0 commit comments

Comments
 (0)