Skip to content

Commit 1a157d0

Browse files
committed
sync up super_errors, partial fix of #4315 - cherry-pick
TODO: add more fixtures snapshot
1 parent bbce72a commit 1a157d0

14 files changed

+132
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
We've found a bug for you!
3+
/.../fixtures/arity_mismatch.re 3:21-27
4+
5+
1 │
6+
2 │ let makeVar = (. ~f, ()) => 34;
7+
3 │ let makeVariables = makeVar(. ~f=f => f);
8+
9+
This function has arity2 but was expected arity1
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
We've found a bug for you!
3+
/.../fixtures/arity_mismatch2.re 3:21-27
4+
5+
1 │
6+
2 │ let makeVar = (. f, ()) => 34;
7+
3 │ let makeVariables = makeVar(. 1,2,3);
8+
9+
This function has arity2 but was expected arity3
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
We've found a bug for you!
3+
/.../fixtures/curry_in_uncurry.re 3:1
4+
5+
1 │ let f = (a,b) => a + b;
6+
2 │
7+
3 │ f(.2,2)->Js.log;
8+
9+
This function is a curried function where an uncurried function is expected
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
We've found a bug for you!
3+
/.../fixtures/method_arity_mismatch.re 3:8-9
4+
5+
1 │ let f = ( obj ) => {
6+
2 │ obj##hi (1,2);
7+
3 │ obj##hi (1)
8+
4 │ }
9+
10+
This method has arity2 but was expected arity1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
We've found a bug for you!
3+
/.../fixtures/uncurry_in_curry.re 3:1
4+
5+
1 │ let f = (.a,b) => a + b;
6+
2 │
7+
3 │ f(2,2);
8+
9+
This is an uncurried BuckleScript function. It must be applied with a dot.
10+
11+
Like this: foo(. a, b)
12+
Not like this: foo(a, b)
13+
14+
This guarantees that your function is fully applied. More info here:
15+
https://bucklescript.github.io/docs/en/function.html#solution-guaranteed-uncurrying
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
let makeVar = (. ~f, ()) => 34;
3+
let makeVariables = makeVar(. ~f=f => f);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
let makeVar = (. f, ()) => 34;
3+
let makeVariables = makeVar(. 1,2,3);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let f = (a,b) => a + b;
2+
3+
f(.2,2)->Js.log;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let f = ( obj ) => {
2+
obj##hi (1,2);
3+
obj##hi (1)
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let f = (.a,b) => a + b;
2+
3+
f(2,2);

0 commit comments

Comments
 (0)