]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/relations/UnresolvedCHRRelation.java
(refs #7375) Fixed implementation of collectEffects
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / relations / UnresolvedCHRRelation.java
index 479d5d22ca4be36ee55c30c9b0eb19505d768718..6cf2930de5a7adb2c4f954195da6e76e0aa5abd3 100644 (file)
@@ -3,8 +3,12 @@ package org.simantics.scl.compiler.elaboration.chr.relations;
 import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;
 import org.simantics.scl.compiler.elaboration.chr.CHRRelation;
 import org.simantics.scl.compiler.internal.parsing.Symbol;
+import org.simantics.scl.compiler.types.TPred;
 import org.simantics.scl.compiler.types.TVar;
 import org.simantics.scl.compiler.types.Type;
+import org.simantics.scl.compiler.types.Types;
+
+import gnu.trove.set.hash.THashSet;
 
 public class UnresolvedCHRRelation extends Symbol implements CHRRelation {
     public String name;
@@ -23,4 +27,18 @@ public class UnresolvedCHRRelation extends Symbol implements CHRRelation {
     public TVar[] getTypeVariables() {
         throw new InternalCompilerError("Encountered unresolved CHRRelation during type checking.");
     }
+    
+    public TPred[] getTypeConstraints() {
+        throw new InternalCompilerError("Encountered unresolved CHRRelation during type checking.");
+    }
+
+    @Override
+    public void collectEnforceEffects(THashSet<Type> effects) {
+        effects.add(Types.PROC);
+    }
+
+    @Override
+    public void collectQueryEffects(THashSet<Type> effects) {
+        effects.add(Types.PROC);
+    }
 }