diff options
Diffstat (limited to 'compiler/treetab.nim')
-rw-r--r-- | compiler/treetab.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/treetab.nim b/compiler/treetab.nim index 7d654509c..f346d8d97 100644 --- a/compiler/treetab.nim +++ b/compiler/treetab.nim @@ -31,7 +31,7 @@ proc hashTree(n: PNode): Hash = of nkStrLit..nkTripleStrLit: result = result !& hash(n.strVal) else: - for i in 0 ..< sonsLen(n): + for i in 0 ..< len(n): result = result !& hashTree(n.sons[i]) proc treesEquivalent(a, b: PNode): bool = @@ -46,8 +46,8 @@ proc treesEquivalent(a, b: PNode): bool = of nkFloatLit..nkFloat64Lit: result = a.floatVal == b.floatVal of nkStrLit..nkTripleStrLit: result = a.strVal == b.strVal else: - if sonsLen(a) == sonsLen(b): - for i in 0 ..< sonsLen(a): + if len(a) == len(b): + for i in 0 ..< len(a): if not treesEquivalent(a.sons[i], b.sons[i]): return result = true if result: result = sameTypeOrNil(a.typ, b.typ) |