Fixed nested calls
This commit is contained in:
parent
f2f0fae36f
commit
6b314f2882
|
@ -362,11 +362,11 @@ proc getStackPos(self: Compiler, name: IdentExpr, depth: int = self.scopeDepth):
|
|||
if name.name.lexeme == variable.name.name.lexeme:
|
||||
if variable.isPrivate and variable.owner != self.currentModule:
|
||||
continue
|
||||
elif variable.depth == depth or variable.depth == 0:
|
||||
if variable.depth == depth or variable.depth == 0:
|
||||
# variable.depth == 0 for globals!
|
||||
found = true
|
||||
break
|
||||
inc(result)
|
||||
inc(result)
|
||||
if not found:
|
||||
return -1
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
operator `+`(a: int): int {
|
||||
operator `-`(a: int): int {
|
||||
return a;
|
||||
}
|
||||
return -a;
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
+1; # Works: defined for int64
|
||||
+1'i32; # Will not work
|
||||
|
|
Loading…
Reference in New Issue