浏览代码

* Avoid crash if right node of _IN keyword is a type node that is not a set

git-svn-id: trunk@17159 -
pierre 14 年之前
父节点
当前提交
f49fb7329a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      compiler/nset.pas

+ 5 - 0
compiler/nset.pas

@@ -231,6 +231,11 @@ implementation
 
          if (right.nodetype=typen) then
            begin
+             if right.resultdef.typ<>setdef then
+               begin
+                 CGMessage(sym_e_set_expected);
+                 exit;
+               end;
              { we need to create a setconstn }
              pst:=createsetconst(tsetdef(ttypenode(right).resultdef));
              t:=csetconstnode.create(pst,ttypenode(right).resultdef);