Skip to content

Commit aa809f0

Browse files
author
Jaro Reinders
committed
Ignore error codes when testing GHC 9.4
1 parent afd8229 commit aa809f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hls-test-utils/src/Development/IDE/Test/Diagnostic.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
module Development.IDE.Test.Diagnostic where
23

34
import Control.Lens ((^.))
@@ -35,10 +36,14 @@ requireDiagnostic actuals expected@(severity, cursor, expectedMsg, mbExpectedCod
3536
&& codeMatches d
3637

3738
codeMatches d =
39+
#if MIN_VERSION_GLASGOW_HASKELL(9,5,0,0)
3840
case (mbExpectedCode, _code d) of
3941
(Nothing, _) -> True
4042
(Just expectedCode, Nothing) -> False
4143
(Just expectedCode, Just actualCode) -> InR expectedCode == actualCode
44+
#else
45+
True
46+
#endif
4247

4348
hasTag :: Maybe DiagnosticTag -> Maybe [DiagnosticTag] -> Bool
4449
hasTag Nothing _ = True

0 commit comments

Comments
 (0)