summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2020-03-12 20:07:02 +0100
committerGitHub <noreply@github.com>2020-03-12 20:07:02 +0100
commit14b2354b7da36041ca046e60e833b5be9a04f1e4 (patch)
tree2e93e0a767eefec28a2ae16bb24fe49c63644888 /compiler
parentf0cd50f9c48ee6bb585cd85615e5844a8082a8c1 (diff)
downloadNim-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.nim2
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)