File tree Expand file tree Collapse file tree 2 files changed +41
-3
lines changed
test/xref2/github_issue_1001.t Expand file tree Collapse file tree 2 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 11 $ ocamlc -c -bin-annot test. ml
22 $ odoc compile test. cmt
33 $ odoc link test. odoc
4- $ odoc html-generate -o html test. odocl
4+ $ odoc html-generate -o html -- indent test. odocl
55 $ odoc support-files -o html
66
77We should have an ' Optional' argument (as opposed to a ' RawOptional' one )
@@ -26,3 +26,37 @@ We should have an 'Optional' argument (as opposed to a 'RawOptional' one)
2626 },
2727 " value" : " Abstract"
2828 }
29+
30+ Harder case contains a " RawOptional" :
31+
32+ $ odoc_print -r g test. odocl
33+ {
34+ " id" : { " `Value" : [ { " `Root" : [ " None" , " Test" ] }, " g" ] },
35+ " source_loc" : " None" ,
36+ " doc" : { " elements" : [], " suppress_warnings" : " false" },
37+ " type_" : {
38+ " Arrow" : [
39+ { " Some" : { " RawOptional" : " optional" } },
40+ {
41+ " Constr" : [
42+ {
43+ " `Resolved" : {
44+ " `Identifier" : {
45+ " `Type" : [ { " `Root" : [ " None" , " Test" ] }, " hard" ]
46+ }
47+ }
48+ },
49+ []
50+ ]
51+ },
52+ {
53+ " Arrow" : [
54+ " None" ,
55+ { " Constr" : [ { " `Resolved" : { " `CoreType" : " unit" } }, [] ] },
56+ { " Var" : " a" }
57+ ]
58+ }
59+ ]
60+ },
61+ " value" : " Abstract"
62+ }
Original file line number Diff line number Diff line change 1- type t = int option
2- let rec f ?(optional : t ) () = f ?optional ()
1+ type easy = int option
2+ let rec f ?(optional : easy ) () = f ?optional ()
3+
4+ type 'a opt = 'a option
5+ type hard = int opt
6+ let rec g ?(optional : hard ) () = g ?optional ()
You can’t perform that action at this time.
0 commit comments