From 15f80450a5cd4ee688d7992367c8715a16f6865a Mon Sep 17 00:00:00 2001 From: Seth Grover Date: Tue, 6 Aug 2024 08:50:59 -0600 Subject: [PATCH] attempt to fix "unsupported type for unit parameter 'cfgFrag': type of inout unit parameters must itself be a unit; for other parameter types, use references instead of inout" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit explanation from Benjamin Bannier: "The technical reason this works is that references in Spicy already provide mutable access to the wrapped data (interior mutability). Having an inout on a reference parameter would seem to mean “function can reseat this reference”, but we do not provide that." This will hopefully make the parser build with the latest spicy release --- analyzer/profinet_io_cm_message.spicy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analyzer/profinet_io_cm_message.spicy b/analyzer/profinet_io_cm_message.spicy index d3ecd55..279e4f3 100644 --- a/analyzer/profinet_io_cm_message.spicy +++ b/analyzer/profinet_io_cm_message.spicy @@ -21,7 +21,7 @@ public type Messages = unit { type ConfigFragmentation = map; -type Message = unit(inout cfgFrag : ConfigFragmentation&) { +type Message = unit(cfgFrag : ConfigFragmentation&) { rpcHeader : PROFINET_IO_CM_RPC_HEADER::RpcHeader; var operationNum : PROFINET_IO_CM_ENUMS::PnioServicesValue &optional; var activityUuid : string &optional;