Skip to content

Commit 24eb8cf

Browse files
committed
Fix off-by-1 in span lengths
1 parent 62ed3fa commit 24eb8cf

File tree

10 files changed

+539
-535
lines changed

10 files changed

+539
-535
lines changed

glean/lang/codemarkup/tests/haskell/code/entity_location.out

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"location": {
1717
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
18-
"location": { "span": { "length": 13, "start": 358 } },
18+
"location": { "span": { "length": 12, "start": 358 } },
1919
"name": "A"
2020
}
2121
}
@@ -35,7 +35,7 @@
3535
},
3636
"location": {
3737
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
38-
"location": { "span": { "length": 41, "start": 447 } },
38+
"location": { "span": { "length": 40, "start": 447 } },
3939
"name": "C"
4040
}
4141
}
@@ -55,7 +55,7 @@
5555
},
5656
"location": {
5757
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
58-
"location": { "span": { "length": 9, "start": 383 } },
58+
"location": { "span": { "length": 8, "start": 383 } },
5959
"name": "C1"
6060
}
6161
}
@@ -75,7 +75,7 @@
7575
},
7676
"location": {
7777
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
78-
"location": { "span": { "length": 5, "start": 394 } },
78+
"location": { "span": { "length": 4, "start": 394 } },
7979
"name": "C2"
8080
}
8181
}
@@ -95,7 +95,7 @@
9595
},
9696
"location": {
9797
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
98-
"location": { "span": { "length": 5, "start": 401 } },
98+
"location": { "span": { "length": 4, "start": 401 } },
9999
"name": "C3"
100100
}
101101
}
@@ -115,7 +115,7 @@
115115
},
116116
"location": {
117117
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
118-
"location": { "span": { "length": 28, "start": 418 } },
118+
"location": { "span": { "length": 27, "start": 418 } },
119119
"name": "R"
120120
}
121121
}
@@ -135,7 +135,7 @@
135135
},
136136
"location": {
137137
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
138-
"location": { "span": { "length": 39, "start": 407 } },
138+
"location": { "span": { "length": 38, "start": 407 } },
139139
"name": "R"
140140
}
141141
}
@@ -155,7 +155,7 @@
155155
},
156156
"location": {
157157
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
158-
"location": { "span": { "length": 34, "start": 372 } },
158+
"location": { "span": { "length": 33, "start": 372 } },
159159
"name": "T"
160160
}
161161
}
@@ -175,7 +175,7 @@
175175
},
176176
"location": {
177177
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
178-
"location": { "span": { "length": 20, "start": 337 } },
178+
"location": { "span": { "length": 19, "start": 337 } },
179179
"name": "a"
180180
}
181181
}
@@ -189,13 +189,13 @@
189189
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
190190
},
191191
"occ": { "key": { "name": "a", "namespace_": 2 } },
192-
"sort": { "internal": { "length": 2, "start": 379 } }
192+
"sort": { "internal": { "length": 1, "start": 379 } }
193193
}
194194
}
195195
},
196196
"location": {
197197
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
198-
"location": { "span": { "length": 2, "start": 379 } },
198+
"location": { "span": { "length": 1, "start": 379 } },
199199
"name": "a"
200200
}
201201
}
@@ -209,13 +209,13 @@
209209
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
210210
},
211211
"occ": { "key": { "name": "a", "namespace_": 2 } },
212-
"sort": { "internal": { "length": 2, "start": 414 } }
212+
"sort": { "internal": { "length": 1, "start": 414 } }
213213
}
214214
}
215215
},
216216
"location": {
217217
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
218-
"location": { "span": { "length": 2, "start": 414 } },
218+
"location": { "span": { "length": 1, "start": 414 } },
219219
"name": "a"
220220
}
221221
}
@@ -229,13 +229,13 @@
229229
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
230230
},
231231
"occ": { "key": { "name": "a", "namespace_": 2 } },
232-
"sort": { "internal": { "length": 2, "start": 463 } }
232+
"sort": { "internal": { "length": 1, "start": 463 } }
233233
}
234234
}
235235
},
236236
"location": {
237237
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
238-
"location": { "span": { "length": 2, "start": 463 } },
238+
"location": { "span": { "length": 1, "start": 463 } },
239239
"name": "a"
240240
}
241241
}
@@ -249,13 +249,13 @@
249249
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
250250
},
251251
"occ": { "key": { "name": "a", "namespace_": 2 } },
252-
"sort": { "internal": { "length": 16, "start": 546 } }
252+
"sort": { "internal": { "length": 15, "start": 546 } }
253253
}
254254
}
255255
},
256256
"location": {
257257
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
258-
"location": { "span": { "length": 16, "start": 546 } },
258+
"location": { "span": { "length": 15, "start": 546 } },
259259
"name": "a"
260260
}
261261
}
@@ -275,7 +275,7 @@
275275
},
276276
"location": {
277277
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
278-
"location": { "span": { "length": 56, "start": 562 } },
278+
"location": { "span": { "length": 55, "start": 562 } },
279279
"name": "f"
280280
}
281281
}
@@ -295,7 +295,7 @@
295295
},
296296
"location": {
297297
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
298-
"location": { "span": { "length": 3, "start": 422 } },
298+
"location": { "span": { "length": 2, "start": 422 } },
299299
"name": "f1"
300300
}
301301
}
@@ -315,7 +315,7 @@
315315
},
316316
"location": {
317317
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
318-
"location": { "span": { "length": 3, "start": 434 } },
318+
"location": { "span": { "length": 2, "start": 434 } },
319319
"name": "f2"
320320
}
321321
}
@@ -335,7 +335,7 @@
335335
},
336336
"location": {
337337
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
338-
"location": { "span": { "length": 15, "start": 473 } },
338+
"location": { "span": { "length": 14, "start": 473 } },
339339
"name": "m"
340340
}
341341
}
@@ -349,13 +349,13 @@
349349
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
350350
},
351351
"occ": { "key": { "name": "m", "namespace_": 0 } },
352-
"sort": { "internal": { "length": 13, "start": 512 } }
352+
"sort": { "internal": { "length": 12, "start": 512 } }
353353
}
354354
}
355355
},
356356
"location": {
357357
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
358-
"location": { "span": { "length": 13, "start": 512 } },
358+
"location": { "span": { "length": 12, "start": 512 } },
359359
"name": "m"
360360
}
361361
}
@@ -369,13 +369,13 @@
369369
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
370370
},
371371
"occ": { "key": { "name": "r", "namespace_": 0 } },
372-
"sort": { "internal": { "length": 2, "start": 585 } }
372+
"sort": { "internal": { "length": 1, "start": 585 } }
373373
}
374374
}
375375
},
376376
"location": {
377377
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
378-
"location": { "span": { "length": 2, "start": 585 } },
378+
"location": { "span": { "length": 1, "start": 585 } },
379379
"name": "r"
380380
}
381381
}
@@ -389,13 +389,13 @@
389389
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
390390
},
391391
"occ": { "key": { "name": "x", "namespace_": 0 } },
392-
"sort": { "internal": { "length": 2, "start": 514 } }
392+
"sort": { "internal": { "length": 1, "start": 514 } }
393393
}
394394
}
395395
},
396396
"location": {
397397
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
398-
"location": { "span": { "length": 2, "start": 514 } },
398+
"location": { "span": { "length": 1, "start": 514 } },
399399
"name": "x"
400400
}
401401
}
@@ -409,13 +409,13 @@
409409
"key": { "name": { "key": "A" }, "unit": { "key": "main" } }
410410
},
411411
"occ": { "key": { "name": "x", "namespace_": 0 } },
412-
"sort": { "internal": { "length": 2, "start": 572 } }
412+
"sort": { "internal": { "length": 1, "start": 572 } }
413413
}
414414
}
415415
},
416416
"location": {
417417
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
418-
"location": { "span": { "length": 2, "start": 572 } },
418+
"location": { "span": { "length": 1, "start": 572 } },
419419
"name": "x"
420420
}
421421
}
@@ -435,7 +435,7 @@
435435
},
436436
"location": {
437437
"file": { "key": "glean/lang/codemarkup/tests/haskell/code/A.hs" },
438-
"location": { "span": { "length": 9, "start": 536 } },
438+
"location": { "span": { "length": 8, "start": 536 } },
439439
"name": "zero"
440440
}
441441
}

0 commit comments

Comments
 (0)