fix for defaults in switch type
This commit is contained in:
parent
e24b05c982
commit
47fc4ee220
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ def mctype(slot_type:Any) -> Ref:
|
||||||
return Ref('SwitchType',
|
return Ref('SwitchType',
|
||||||
v["compareTo"].split('/')[-1],
|
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)),
|
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
|
# return SwitchType(mctype(v)) # TODO
|
||||||
elif t == "bitfield":
|
elif t == "bitfield":
|
||||||
|
|
Loading…
Reference in a new issue