Skip to content

Commit a7d52c5

Browse files
Fix line number in broken test.
We have this code: 20: ddd :: Num a => a -> a -> a 21: ddd vv ww = vv +! ww The intention was to ask for the type definition of symbol "a" in line 20, and then assert that no type definitions were found. The reality is that the test was asking for the definition of the symbol at (20, 15) in 0-based indexing, which is the "!" in "+!". Until recently, ghcide could not find type definitions for "+!", so no type definitions were found and the test passed. But now, ghcide can find type definitions for "+!", and this test has begun to fail. The solution is to change (20, 15) to (19, 15), so that we ask for the type definitions of the symbol "a", which will not be found.
1 parent fc761a6 commit a7d52c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ghcide/test/exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2444,7 +2444,7 @@ findDefinitionAndHoverTests = let
24442444
xtcL5 = Position 9 11 ; xtc = [ExpectExternFail, ExpectHoverText ["Int", "Defined in ", "GHC.Types"]]
24452445
tcL6 = Position 10 11 ; tcData = [mkR 7 0 9 16, ExpectHoverText ["TypeConstructor", "GotoHover.hs:8:1"]]
24462446
vvL16 = Position 20 12 ; vv = [mkR 20 4 20 6]
2447-
opL16 = Position 20 15 ; op = [mkR 21 2 21 4]
2447+
opL16 = Position 19 15 ; op = [mkR 21 2 21 4]
24482448
opL18 = Position 22 22 ; opp = [mkR 22 13 22 17]
24492449
aL18 = Position 22 20 ; apmp = [mkR 22 10 22 11]
24502450
b'L19 = Position 23 13 ; bp = [mkR 23 6 23 7]

0 commit comments

Comments
 (0)