Open Luyten-Orion opened 3 months ago
I don't think I support or have ever tested nested variant objects. This is more of a feature / improvement request. I've never found myself wanting nested variant so it is unlikely I'm going to add this in the near future.
Fair enough, I can work around this anyway, but thought it was important to be put here, do you want me to change the name of the issue?
If you'd like to work on a PR for nested object variants (even just 1 extra level, not necessarily N-levels if that proves to be more annoying) I'd be happy to look at and merge a PR.
Even if not, keeping this issue open for tracking makes sense. It is a perfectly valid improvement to make.
Perhaps even a simpler PR detecting nested object variants and providing a better error message would be a big improvement.
I am not an expert on Nim macro stuff so this type of thing is much less pleasant for me vs "normal" programming.
Hey there, with this code:
I get a
type mismatch
, with the specific error below:It seems like it's an issue with nested object variants, as replacing the snippet
with
Compiles just fine.