From 11233dea15fd9ecef81bdd2e6fcac39b44577260 Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Sun, 24 Jul 2022 21:15:01 +0200
Subject: [PATCH] Allow destructors to have arguments

---
 src/Quasar/Wayland/Protocol/TH.hs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/Quasar/Wayland/Protocol/TH.hs b/src/Quasar/Wayland/Protocol/TH.hs
index 489df04..49d408c 100644
--- a/src/Quasar/Wayland/Protocol/TH.hs
+++ b/src/Quasar/Wayland/Protocol/TH.hs
@@ -621,8 +621,6 @@ parseMessage isRequest interface (opcode, element) = do
       Just "destructor" -> pure True
       Just messageType -> fail $ "Unknown message type: " <> messageType
 
-  when (isDestructor && not (null arguments)) $ fail $ "Destructor must not have arguments: " <> loc
-
   forM_ arguments \arg -> do
     when
       do arg.argType == GenericNewIdArgument && (interface /= "wl_registry" || name /= "bind")
-- 
GitLab