Fixed a bug that causes type-checking arithmetic expressions to loop
Merge pull request #46 from plmday/master

Fix #45.