File tree Expand file tree Collapse file tree 6 files changed +54
-6
lines changed
Expand file tree Collapse file tree 6 files changed +54
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ depends: [
2828 "logs" {>= "0.7.0"}
2929 "cmdliner" {>= "1.1.0"}
3030 "re" {>= "1.7.2"}
31- "ocaml-version" {>= "3.6.5 "}
31+ "ocaml-version" {>= "2.3.0 "}
3232 "lwt" {with-test}
3333 "camlp-streams"
3434 "result"
Original file line number Diff line number Diff line change @@ -64,10 +64,18 @@ first
6464Exception: Failure "second".
6565```
6666
67- ``` ocaml version>=4.08
67+ ``` ocaml version>=4.08,version<5.3
6868# let x =
6969 1 + "42";;
7070Line 2, characters 7-11:
7171Error: This expression has type string but an expression was expected of type
7272 int
7373```
74+
75+ ``` ocaml version>=5.3
76+ # let x =
77+ 1 + "42";;
78+ Line 2, characters 7-11:
79+ Error: This constant has type string but an expression was expected of type
80+ int
81+ ```
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ Error: This expression has type string but an expression was expected of type
5656 int
5757```
5858
59- ``` ocaml version>=4.08
59+ ``` ocaml version>=4.08,version<5.3
6060# let f x = function
6161 | 0 -> 1
6262 | n ->
@@ -66,6 +66,16 @@ Error: This expression has type string but an expression was expected of type
6666 int
6767```
6868
69+ ``` ocaml version>=5.3
70+ # let f x = function
71+ | 0 -> 1
72+ | n ->
73+ n + "foo";;
74+ Line 4, characters 7-12:
75+ Error: This constant has type string but an expression was expected of type
76+ int
77+ ```
78+
6979Line directives work for ` sh ` blocks as well:
7080
7181``` sh version=4.08.1
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Error: This expression has type string but an expression was expected of type
3030 int
3131```
3232
33- ``` ocaml version>=4.08
33+ ``` ocaml version>=4.08,version<5.3
3434# #require "fmt";;
3535# let x = 3;;
3636val x : int = 3
@@ -39,3 +39,13 @@ Line 1, characters 5-10:
3939Error: This expression has type string but an expression was expected of type
4040 int
4141```
42+
43+ ``` ocaml version>=5.3
44+ # #require "fmt";;
45+ # let x = 3;;
46+ val x : int = 3
47+ # x + "foo";;
48+ Line 1, characters 5-10:
49+ Error: This constant has type string but an expression was expected of type
50+ int
51+ ```
Original file line number Diff line number Diff line change @@ -59,11 +59,20 @@ Indentation test:
5959 val x : int = 1
6060]}
6161
62- {delim@ocaml[
62+ {delim@ocaml version<5.3 [
6363 let f = 1 + "2"
6464]delim[
6565{err@mdx-error[
6666Line 1, characters 15-18:
6767Error: This expression has type string but an expression was expected of type
6868 int
6969]err}]}
70+
71+ {delim@ocaml version>=5.3[
72+ let f = 1 + "2"
73+ ]delim[
74+ {err@mdx-error[
75+ Line 1, characters 15-18:
76+ Error: This constant has type string but an expression was expected of type
77+ int
78+ ]err}]}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ val bar : string
5151val baz : string
5252
5353(* *
54- {[
54+ {@ocaml version<5.3 [
5555 let f = 1 + "2"
5656][
5757{err@mdx-error[
@@ -61,6 +61,17 @@ Error: This expression has type string but an expression was expected of type
6161]err}]}
6262*)
6363
64+ (* *
65+ {@ocaml version>=5.3[
66+ let f = 1 + "2"
67+ ][
68+ {err@mdx-error[
69+ Line 1, characters 15-18:
70+ Error: This constant has type string but an expression was expected of type
71+ int
72+ ]err}]}
73+ *)
74+
6475(* *
6576{@ocaml skip[
6677 let f = 1 + "2"
You can’t perform that action at this time.
0 commit comments