Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tools/transpile.ms
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,12 @@ Transpiler.lookup = function(identifier, context)
end if

// 1. locals, including curMethod parameters (search in reverse order)
for i in range(self.localVars.len-1, 0, -1)
var = self.localVars[i]
if var.name == identifier then return var
end for
if self.localVars then
for i in range(self.localVars.len-1, 0, -1)
var = self.localVars[i]
if var.name == identifier then return var
end for
end if

// 2. fields and methods of the current class
if self.curClass then
Expand Down