Nim
Nim copied to clipboard
progess default field
inspired by https://github.com/nim-lang/Nim/pull/12378
default fields for object
- [x] result
- [x] object variant
the addition compared to https://github.com/nim-lang/Nim/pull/12378
- [x] var
- [x] omit type for default fields
- [x] default(Type)
- [x] new(ref)
- [x] nested object definition
- [x] array
- [x] an object of array etc. in the definition of the object
- [x] threadvar
- [x] noinit
- [x] range
- [x] fieldVisible issue
- [x] tuple
- [ ] distinct
- [ ] newFinalize
- [ ] seq(var, result, setLen)
- [ ] docs
- [x] tests
notes for me only
abstractInst vs {tyGenericInst, tyAlias, tySink}
It is quite complex...
It seems that now I need to add a flag to handle fieldVisible issue...
As a bonus, range defined in the object seem to work now(namely DateTime can be used as an object attribute) ignoring the field visible issue.
succeeded by https://github.com/nim-lang/Nim/pull/20220