浏览代码

Print error in case of non-integer in arithmetic operation

pull/5/head
mtardy 4 年前
父节点
当前提交
2128d6abf9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      object.c

+ 4
- 0
object.c 查看文件

@ -177,6 +177,10 @@ void println(oop ast);
int getInteger(oop obj)
{
if (!isInteger(obj)) {
fprintf(stderr, "\nNon-integer in arithmetic expression\n");
exit(1);
}
#if (USE_TAG)
return (intptr_t)obj >> 1;
#else

正在加载...
取消
保存