-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix printing of user-defined option type used for optional arguments (#…
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(* TEST | ||
toplevel; | ||
*) | ||
|
||
(** Test that type of optional argument is printed, even if using a non-predef | ||
option type *) | ||
|
||
type nonrec 'a maybe = 'a option;; | ||
|
||
let create_property ?x () = let _ = (x : int maybe) in ();; |
3 changes: 3 additions & 0 deletions
3
ocaml/testsuite/tests/printing-types/user-option-args.ocaml.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type nonrec 'a maybe = 'a option | ||
val create_property : ?x:int -> unit -> unit = <fun> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters