out parameters: enforce that 'out' is only used as a parameter (#20510)

* out parameters: enforce that 'out' is only used as a parameter

* make tables.nim use 'out' parameters

* better backwards compat
This commit is contained in:
Andreas Rumpf 2022-10-07 22:26:53 +02:00 • committed by GitHub
commit e83f27e6a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 3 deletions

View file

@ -75,7 +75,7 @@ type
nnkTupleTy, nnkTupleClassTy, nnkTypeClassTy, nnkStaticTy,
nnkRecList, nnkRecCase, nnkRecWhen,
nnkRefTy, nnkPtrTy, nnkVarTy,
nnkConstTy, nnkMutableTy,
nnkConstTy, nnkOutTy,
nnkDistinctTy,
nnkProcTy,
nnkIteratorTy, # iterator type
@ -125,6 +125,9 @@ type
TNimSymKinds* {.deprecated.} = set[NimSymKind]
const
nnkMutableTy* {.deprecated.} = nnkOutTy
type
NimIdent* {.deprecated.} = object of RootObj
## Represents a Nim identifier in the AST. **Note**: This is only