diff options
author | Miran <narimiran@disroot.org> | 2020-03-12 20:07:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 20:07:02 +0100 |
commit | 14b2354b7da36041ca046e60e833b5be9a04f1e4 (patch) | |
tree | 2e93e0a767eefec28a2ae16bb24fe49c63644888 /compiler | |
parent | f0cd50f9c48ee6bb585cd85615e5844a8082a8c1 (diff) | |
download | Nim-14b2354b7da36041ca046e60e833b5be9a04f1e4.tar.gz |
rename `lenTuple` and `lenVarargs` (#13639)
* rename 'lenTuple' to 'tupleLen' Rationale: `lenTuple` is a tuple consisting of lengths (e.g. `(1, 5, 0)`), `tupleLen` is a length of a tuple (e.g. `tupleLen((1, 5, 0) == 3`) * rename 'lenVarargs' to 'varargsLen' The same rationale as a previous commit. Consistency.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semmagic.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index ffdad5628..af80b3ca3 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -187,7 +187,7 @@ proc evalTypeTrait(c: PContext; traitCall: PNode, operand: PType, context: PSym) var operand = operand.skipTypes({tyGenericInst}) let cond = operand.kind == tyTuple and operand.n != nil result = newIntNodeT(toInt128(ord(cond)), traitCall, c.graph) - of "lenTuple": + of "tupleLen": var operand = operand.skipTypes({tyGenericInst}) assert operand.kind == tyTuple, $operand.kind result = newIntNodeT(toInt128(operand.len), traitCall, c.graph) |