Closed wcampbell0x2a closed 10 months ago
Fair enough. From a code-gen perspective, I'm not sure if there's a way of getting the type? probably some hackery via walking the struct/enum, etc.
We currently have type
to specify the variant type... wonder if we could extend the use of it to include this case
Fair enough. From a code-gen perspective, I'm not sure if there's a way of getting the type? probably some hackery via walking the struct/enum, etc.
We currently have
type
to specify the variant type... wonder if we could extend the use of it to include this case
Right now we don't allow id
and type
(to be id_type
in the future). I don't know if I have the time/patience right now to figure out syn invocations to parse that xD
Fair enough. From a code-gen perspective, I'm not sure if there's a way of getting the type? probably some hackery via walking the struct/enum, etc. We currently have
type
to specify the variant type... wonder if we could extend the use of it to include this caseRight now we don't allow
id
andtype
(to beid_type
in the future). I don't know if I have the time/patience right now to figure out syn invocations to parse that xD
Yeah I agree, I don't favor that approach. You're right, currently we can't use id
and type
together, what if we could?
id
- use id
to select variant
type
- use type
to read/write variant of type type
id + type
- use id
to select variant with type type
Remove unwrap causing the following error when the EnumExt tried to infer what type is was to return. An attribute could be added in the future to aid this, but for now we will just not emit the deku_id() for this type of enum. I decided in other causes (which aren't tested), to also remove the error and just not emit the function also.
help: message: called
Result::unwrap()
on anErr
value: Error("expected,
")Closes #397