Skip to content

Commit 63c557e

Browse files
committedJun 9, 2023
Fix syntax tests.
Fixes #6286
1 parent 4a3dff4 commit 63c557e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
 

‎jscomp/syntax/testrunner/res_test.ml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ let dataDir = "jscomp/syntax/tests"
44

55
(* test printing of .res file*)
66
let () =
7+
Config.uncurried := Legacy;
78
let filename = Filename.concat dataDir "api/resSyntax.res" in
89
let prettySource = Res_multi_printer.print `res ~input:filename in
910
assert (
@@ -61,6 +62,8 @@ module OutcomePrinterTests = struct
6162
let signatureToOutcome structure =
6263
Lazy.force Res_outcome_printer.setup;
6364

65+
Clflags.include_dirs :=
66+
Filename.concat "lib" "ocaml" :: !Clflags.include_dirs;
6467
Res_compmisc.init_path ();
6568
Clflags.nopervasives := true;
6669
let env = Res_compmisc.initial_env () in
@@ -84,7 +87,7 @@ module OutcomePrinterTests = struct
8487
Typedecl.report_error Format.str_formatter err;
8588
prerr_string (Format.flush_str_formatter ());
8689
exit 1
87-
| e ->
90+
| e when false ->
8891
prerr_string
8992
("Unknown error while trying to print outcome tree.\n"
9093
^ "We don't display all the outcome type errors; try adding the new \

‎jscomp/syntax/tests/oprint/expected/oprint.resi.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ type \"let" = int
171171
type \"type" = [#"Point🗿"(\"let", float)]
172172
type t23 = [#1 | #"10space" | #123]
173173
type exoticUser = {\"let": string, \"type": float}
174-
type arity1a = (. unit) => int
175-
type arity1b = (. int) => int
176-
type arity2 = (. int, int) => int
174+
type arity1a = unit => int
175+
type arity1b = int => int
176+
type arity2 = (int, int) => int
177177
type obj1<'a> = option<{"a": int}>
178178
type obj2 = {"a": int}
179179
type obj3 = {"a": int}
@@ -217,7 +217,7 @@ type permissions = [#644 | #777]
217217
type numericPolyVarWithPayload = [#1(string) | #2(int, string)]
218218
let numericPolyVarMatch: [> #1(string) | #2(int, string)]
219219
let sort: (module(Set.S with type elt = 'a), list<'a>) => list<'a>
220-
let make_set: (('a, 'a) => int) => module(Set.S with type elt = 'a)
220+
let make_set: ('a, 'a) => int => module(Set.S with type elt = 'a)
221221
type picture = string
222222
module type DEVICE = {
223223
let draw: picture => unit

0 commit comments

Comments
 (0)