Skip to content

Commit

Permalink
types: fix reference to node.decl
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Oct 16, 2017
1 parent 4edc177 commit 85aadf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions titan-compiler/checker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ local function checkfor(node, st, errors)
ftype = node.decl._type
if not types.equals(ftype, types.Integer) and
not types.equals(ftype, types.Float) then
typeerror(errors, "type of for control variable " .. node.decl.name .. " must be integer or float", node.delc._pos)
typeerror(errors, "type of for control variable " .. node.decl.name .. " must be integer or float", node.decl._pos)
node.decl._type = types.Integer
ftype = types.Integer
end
Expand All @@ -175,7 +175,7 @@ local function checkfor(node, st, errors)
checkstat(node.decl, st, errors)
if not types.equals(ftype, types.Integer) and
not types.equals(ftype, types.Float) then
typeerror(errors, "type of for control variable " .. node.decl.name .. " must be integer or float", node.delc._pos)
typeerror(errors, "type of for control variable " .. node.decl.name .. " must be integer or float", node.decl._pos)
node.decl._type = types.Integer
ftype = types.Integer
end
Expand Down

0 comments on commit 85aadf6

Please sign in to comment.