From 47fc4ee22088615301966b02f95c9ac08fefe753 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sat, 11 Dec 2021 06:01:14 +0100 Subject: [PATCH] fix for defaults in switch type --- compiler/proto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/proto.py b/compiler/proto.py index 941e5fe..23b3711 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -136,7 +136,7 @@ def mctype(slot_type:Any) -> Ref: return Ref('SwitchType', v["compareTo"].split('/')[-1], Ref(format_dict({int(k) if k.isnumeric() else repr(k):mctype(x) for k,x in v["fields"].items()}, depth=0)), - v["default"] if "default" in v and v['default'] != 'void' else None, + mctype(v["default"]) if "default" in v and v['default'] != 'void' else None, ) # return SwitchType(mctype(v)) # TODO elif t == "bitfield":