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" [
127
127
doc <- openDoc " ApplyRefact2.hs" " haskell"
128
128
testHlintDiagnostics doc
129
129
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
131
131
testRefactor " ApplyRefact1.hs" " Redundant bracket"
132
132
expectedLambdaCase
133
133
134
+ , testCase " apply-refact works with -XTypeApplications argument (#1242)" $ runHlintSession " typeapps" $ do
135
+ testRefactor " ApplyRefact1.hs" " Redundant bracket"
136
+ expectedTypeApp
137
+
134
138
, testCase " apply hints works with LambdaCase via language pragma" $ runHlintSession " " $ do
135
139
testRefactor " ApplyRefact1.hs" " Redundant bracket"
136
140
(" {-# LANGUAGE LambdaCase #-}" : expectedLambdaCase)
@@ -206,7 +210,9 @@ hlintTests = testGroup "hlint suggestions" [
206
210
, " f = {- inline comment -}{- inline comment inside refactored code -} 1 -- ending comment" , " "
207
211
, " -- final comment"
208
212
]
209
-
213
+ expectedTypeApp = [ " module ApplyRefact1 where" , " "
214
+ , " a = id @Int 1"
215
+ ]
210
216
renameTests :: TestTree
211
217
renameTests = testGroup " rename suggestions" [
212
218
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