Skip to content

Commit 1a6bb07

Browse files
peterwicksstringfieldjneira
authored andcommitted
Ensure that loading testfiles produces at least one diagnostic.
completion/Context.hs used to generate a diagnostic for the unused "x", but no longer does so without -Wunused-binds. completion/Completion.hs used to generate a diagnostic for the unused import of Data.Maybe, but no longer does so without -Wunused-imports. We could add these flags like: {-# OPTIONS_GHC -Wunused-binds #-} But that would force us to update all the hardcoded line numbers in the unit tests. Instead we just add a redundant id, carefully positioned to avoid disturbing any hardcoded positions.
1 parent 4457ef5 commit 1a6bb07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/testdata/completion/Completion.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ main :: IO ()
66
main = putStrLn "hello"
77

88
foo :: Either a b -> Either a b
9-
foo = id
9+
foo = id id

test/testdata/completion/Context.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module Context where
22
import Control.Concurrent as Conc
33
foo :: Int -> Int
4-
foo x = abs 42
4+
foo x = abs $ id 42

0 commit comments

Comments
 (0)