]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/relations/CHRConstraint.java
(refs #7866) Better error location for the NPE in compilation
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / relations / CHRConstraint.java
index c0f43928877458cbb9a9241ad3e764481acd3ce5..8b7c122a98458b1a8fa5fbac7e745ae36edb72cf 100644 (file)
@@ -30,10 +30,12 @@ import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.Types;
 
 import gnu.trove.map.hash.TIntObjectHashMap;
+import gnu.trove.set.hash.THashSet;
 
 public class CHRConstraint extends Symbol implements CHRRelation {
     public final String name;
     public final Type[] parameterTypes;
+    public String[] fieldNames;
     
     public boolean implicitlyDeclared;
 
@@ -229,4 +231,19 @@ public class CHRConstraint extends Symbol implements CHRRelation {
         else
             return w.apply(location, accessor, fact);
     }
+    
+    @Override
+    public String[] getFieldNames() {
+        return fieldNames;
+    }
+
+    @Override
+    public void collectEnforceEffects(THashSet<Type> effects) {
+        effects.add(Types.PROC);
+    }
+
+    @Override
+    public void collectQueryEffects(THashSet<Type> effects) {
+        effects.add(Types.PROC);
+    }
 }