diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs
index 59a9ca1e23bd42bcd539e6db908b968fb6fc6e77..234fbcb04888ae065162527a1f504fe0f625e355 100644
--- a/compiler/GHC/Tc/Gen/Pat.hs
+++ b/compiler/GHC/Tc/Gen/Pat.hs
@@ -647,11 +647,11 @@ AST is used for the subtraction operation.
 -- Here we get rid of it and add the finalizers to the global environment.
 --
 -- See Note [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice.
-  SplicePat _ (HsSpliced _ mod_finalizers (HsSplicedPat pat)) -> do
+  SplicePat _ splice -> case splice of
+    (HsSpliced _ mod_finalizers (HsSplicedPat pat)) -> do
        addModFinalizersWithLclEnv mod_finalizers
        tc_pat pat_ty pat penv thing_inside
-
-  _other_pat -> panic "tc_pat"
+    _ -> panic "invalid splice in splice pat"
 
 
 {-