File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,14 @@ hlintTests = testGroup "hlint suggestions" [
127127 doc <- openDoc " ApplyRefact2.hs" " haskell"
128128 testHlintDiagnostics doc
129129
130- , testCase " apply-refact works with LambdaCase via ghc -XLambdaCase argument (#590)" $ runHlintSession " lambdacase" $ do
130+ , testCase " apply-refact works with -XLambdaCase argument (#590)" $ runHlintSession " lambdacase" $ do
131131 testRefactor " ApplyRefact1.hs" " Redundant bracket"
132132 expectedLambdaCase
133133
134+ , testCase " apply-refact works with -XTypeApplications argument (#1242)" $ runHlintSession " typeapps" $ do
135+ testRefactor " ApplyRefact1.hs" " Redundant bracket"
136+ expectedTypeApp
137+
134138 , testCase " apply hints works with LambdaCase via language pragma" $ runHlintSession " " $ do
135139 testRefactor " ApplyRefact1.hs" " Redundant bracket"
136140 (" {-# LANGUAGE LambdaCase #-}" : expectedLambdaCase)
@@ -206,7 +210,9 @@ hlintTests = testGroup "hlint suggestions" [
206210 , " f = {- inline comment -}{- inline comment inside refactored code -} 1 -- ending comment" , " "
207211 , " -- final comment"
208212 ]
209-
213+ expectedTypeApp = [ " module ApplyRefact1 where" , " "
214+ , " a = id @Int 1"
215+ ]
210216renameTests :: TestTree
211217renameTests = testGroup " rename suggestions" [
212218 testCase " works" $ runSession hlsCommand noLiteralCaps " test/testdata" $ do
Original file line number Diff line number Diff line change 1+ module ApplyRefact1 where
2+
3+ a = (id @ Int 1 )
Original file line number Diff line number Diff line change 1+ cradle :
2+ direct :
3+ arguments :
4+ - " -XTypeApplications"
5+ - " ApplyRefact1"
You can’t perform that action at this time.
0 commit comments