Skip to content

Commit 01a596f

Browse files
committed
[Super errors] Add the last line of a file to the code frame
This is technically a small bug from way back. The recent refactor #5013 allowed us to fix this.
1 parent 39db854 commit 01a596f

26 files changed

+24
-30
lines changed

jscomp/build_tests/super_errors/expected/collections.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
1 │ /* wrong type in a list */
66
2 │ [1, 2, "Hello"] -> ignore;
7+
3 │
78

89
This has type: string
910
Somewhere wanted: int

jscomp/build_tests/super_errors/expected/highlighting2.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2 ┆ let a: int = "hel
77
3 ┆
88
4 ┆ lo";
9+
5 ┆
910

1011
This has type: string
1112
Somewhere wanted: int

jscomp/build_tests/super_errors/expected/highlighting3.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2 │ let a: int = "helllllll
77
3 │
88
4 │ loooooooooooooo";
9+
5 │
910

1011
This has type: string
1112
Somewhere wanted: int

jscomp/build_tests/super_errors/expected/highlighting5.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
1 │ /* overflows in the terminal */
66
2 │ let a: int = "hellllllllllllllllllllllllllllllllllllllllllllllllllllllll
77
lllllllllllllllllllllllllll";
8+
3 │
89

910
This has type: string
1011
Somewhere wanted: int

jscomp/build_tests/super_errors/expected/highlighting6.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
1 │ let aaaaa = 10;
66
2 │ let b = aaaab;
7+
3 │
78

89
The value aaaab can't be found
910

jscomp/build_tests/super_errors/expected/modules1.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/.../fixtures/modules1.re:1:9-13
44

55
1 │ let b = Foo.b;
6+
2 │
67

78
The module or file Foo can't be found.
89
- If it's a third-party dependency:

jscomp/build_tests/super_errors/expected/modules3.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
10 │
77
11 │ let asd = A.B.C.D.aaa;
88
12 │
9+
13 │
910

1011
The value aaa can't be found in A.B.C.D
1112

jscomp/build_tests/super_errors/expected/moreArguments1.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44

55
1 │ let x = (~a, ~b) => a + b;
66
2 │ let y = x(~a=2) + 2;
7+
3 │
78

89
This call is missing an argument of type (~b: int)

jscomp/build_tests/super_errors/expected/moreArguments2.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44

55
1 │ let x = (a, b) => a + b;
66
2 │ let y = x(2) + 2;
7+
3 │
78

89
This call is missing an argument of type int

jscomp/build_tests/super_errors/expected/moreArguments3.re.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44

55
1 │ let x = (a, b, c, d) => a + b;
66
2 │ let y = x(2) + 2;
7+
3 │
78

89
This call is missing arguments of type: int, 'a, 'b

0 commit comments

Comments
 (0)