Skip to content

Commit

Permalink
Fix broken tests for signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
July541 committed Sep 17, 2022
1 parent a66a6c5 commit 3cc39a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ construct nfp hf (ident, contexts, ssp)

renderTyDecl = case ident of
Left _ -> Nothing
Right name -> case getNameBindingInClass name ssp (getAsts hf) of
Right name -> case getNameBinding name (getAsts hf) of
Nothing -> Nothing
Just sp -> case resolveIntoCallHierarchy hf (realSrcSpanToRange sp ^. L.start) nfp of
Just (Just items) -> listToMaybe items
Expand Down
4 changes: 2 additions & 2 deletions plugins/hls-call-hierarchy-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ prepareCallHierarchyTests =
expected = mkCallHierarchyItemC "A" SkConstructor range selRange
oneCaseWithCreate contents 1 13 expected
, testGroup "type signature"
[ knownBrokenForGhcVersions [GHC94] "type signature broken" $ testCase "next line" $ do
[ testCase "next line" $ do
let contents = T.unlines ["a::Int", "a=3"]
range = mkRange 1 0 1 3
selRange = mkRange 1 0 1 1
expected = mkCallHierarchyItemV "a" SkFunction range selRange
oneCaseWithCreate contents 0 0 expected
, knownBrokenForGhcVersions [GHC94] "type signature broken" $ testCase "multi functions" $ do
, testCase "multi functions" $ do
let contents = T.unlines [ "a,b::Int", "a=3", "b=4"]
range = mkRange 2 0 2 3
selRange = mkRange 2 0 2 1
Expand Down

0 comments on commit 3cc39a3

Please # to comment.