From 7bb91b3509add436d48176a77458270fecb4e3c7 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Wed, 1 Feb 2023 04:32:24 +0100 Subject: [PATCH] Fix build. --- src/cbor.cr | 10 +++++----- src/json.cr | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cbor.cr b/src/cbor.cr index 04bdc62..0048788 100644 --- a/src/cbor.cr +++ b/src/cbor.cr @@ -5,20 +5,20 @@ require "./ipc.cr" class IPC::CBOR include ::CBOR::Serializable - @[::CBOR::Field(ignored: true)] - getter type = -1 + #@[::CBOR::Field(ignored: true)] + #getter type = -1 class_getter type = -1 property id : ::CBOR::Any? + def type + @@type + end macro message(id, type, &block) class {{id}} < ::IPC::CBOR include ::CBOR::Serializable @@type = {{type}} - def type - @@type - end {{yield}} end diff --git a/src/json.cr b/src/json.cr index aef746e..768a86a 100644 --- a/src/json.cr +++ b/src/json.cr @@ -5,20 +5,20 @@ require "./ipc.cr" class IPC::JSON include ::JSON::Serializable - @[::JSON::Field(ignored: true)] - getter type = -1 - class_getter type = -1 + #@[::JSON::Field(ignored: true)] + class_property type = -1 property id : ::JSON::Any? + def type + @@type + end + macro message(id, type, &block) class {{id}} < ::IPC::JSON include ::JSON::Serializable @@type = {{type}} - def type - @@type - end {{yield}} end