Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yinwang0 committed Feb 5, 2014
1 parent 5803f99 commit 950bffe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/yinwang/yin/ast/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Value interp(Scope s) {
public Value typecheck(Scope s) {
s = new Scope(s);
for (int i = 0; i < statements.size() - 1; i++) {
statements.get(i).interp(s);
statements.get(i).typecheck(s);
}
return statements.get(statements.size() - 1).typecheck(s);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/typecheck1.yin
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
true

(if true 10 "ok")

(if true 10 (if false "ok" true))

0 comments on commit 950bffe

Please sign in to comment.