Skip to content

Commit

Permalink
per comment
Browse files Browse the repository at this point in the history
  • Loading branch information
riaqn committed Oct 25, 2023
1 parent f165d4c commit d8d21c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ocaml/testsuite/tests/typing-local/local.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2058,12 +2058,14 @@ val testboo3 : unit -> local_ bool = <fun>
|}]
(* Test from Nathanaëlle Courant.
User can define strange AND, and its arguments should not cross modes. *)
external strange_and : 'a option -> 'a option -> bool = "%sequand"
User can define strange AND. Supposedly [strange_and] will look at its first
arguments, and returns [None] or tailcall on second argument accordingly.
The second argument should not cross modes in generall. *)
external strange_and : bool -> 'a option -> 'a option = "%sequand"
let testboo4 () =
let local_ x = Some "hello" in
strange_and x x
strange_and true x
[%%expect{|
external strange_and : 'a option -> 'a option -> bool = "%sequand"
Line 5, characters 14-15:
Expand Down

0 comments on commit d8d21c6

Please sign in to comment.