Skip to content

Commit e47704c

Browse files
committed
singular on 1 args
1 parent 69c8067 commit e47704c

11 files changed

+11
-11
lines changed

compiler/ml/typecore.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4464,7 +4464,7 @@ let report_error env ppf error =
44644464
"@ @[It is applied with @{<error>%d@} argument%s but it requires \
44654465
@{<info>%d@}.@]@]"
44664466
args
4467-
(if args = 0 then "" else "s")
4467+
(if args = 1 then "" else "s")
44684468
arity
44694469
| Field_not_optional (name, typ) ->
44704470
fprintf ppf "Field @{<info>%s@} is not optional in type %a. Use without ?"

tests/build_tests/super_errors/expected/arity_mismatch.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
3 │
88

99
This function has type (~f: 'a => 'a, unit) => int
10-
It is applied with 1 arguments but it requires 2.
10+
It is applied with 1 argument but it requires 2.

tests/build_tests/super_errors/expected/method_arity_mismatch.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
5 │
1010

1111
This function has type (int, int) => unit
12-
It is applied with 1 arguments but it requires 2.
12+
It is applied with 1 argument but it requires 2.

tests/build_tests/super_errors/expected/moreArguments1.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
3 │
88

99
This function has type (~a: int, ~b: int) => int
10-
It is applied with 1 arguments but it requires 2.
10+
It is applied with 1 argument but it requires 2.

tests/build_tests/super_errors/expected/moreArguments2.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
3 │
88

99
This function has type (int, int) => int
10-
It is applied with 1 arguments but it requires 2.
10+
It is applied with 1 argument but it requires 2.

tests/build_tests/super_errors/expected/moreArguments3.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
3 │
88

99
This function has type (int, int, 'a, 'b) => int
10-
It is applied with 1 arguments but it requires 4.
10+
It is applied with 1 argument but it requires 4.

tests/build_tests/super_errors/expected/moreArguments4.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
3 │
88

99
This function has type (int, ~b: int, ~c: 'a, ~d: 'b) => int
10-
It is applied with 1 arguments but it requires 4.
10+
It is applied with 1 argument but it requires 4.

tests/build_tests/super_errors/expected/moreArguments5.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
6 │
99

1010
This function has type (int, 'a, 'b, 'c) => Sub.a
11-
It is applied with 1 arguments but it requires 4.
11+
It is applied with 1 argument but it requires 4.

tests/build_tests/super_errors/expected/opt_args_arity.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
2 │ let x = f(42)
77

88
This function has type (~a: int=?, int, int) => int
9-
It is applied with 1 arguments but it requires 2.
9+
It is applied with 1 argument but it requires 2.

tests/build_tests/super_errors/expected/recursive_type.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
This function has type
1212
((option<'a>, ([> #List(list<'b>)] as 'b)) => 'c, 'd) => 'c
13-
It is applied with 1 arguments but it requires 2.
13+
It is applied with 1 argument but it requires 2.

tests/build_tests/super_errors/expected/warnings1.res.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
5 │ }
1010

1111
This function has type (int, int) => int
12-
It is applied with 1 arguments but it requires 2.
12+
It is applied with 1 argument but it requires 2.

0 commit comments

Comments
 (0)