summaryrefslogtreecommitdiff
path: root/compiler/nset.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nset.pas')
-rw-r--r--compiler/nset.pas5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/nset.pas b/compiler/nset.pas
index 9e72455551..5edc944ab5 100644
--- a/compiler/nset.pas
+++ b/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);