]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java
Implemented GraphPropertyRelation with the new CHR implementation
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / Types.java
index b20ee9f121ba4890be21b58e53540de72b4a1a6a..f793754eed215be13e6ead654b115dac722b5df2 100644 (file)
@@ -1015,6 +1015,15 @@ public class Types {
         return result;
     }
     
+    public static TPred[] replace(TPred[] types, TVar[] from, Type[] to) {
+        if(types.length == 0)
+            return TPred.EMPTY_ARRAY;
+        TPred[] result = new TPred[types.length];
+        for(int i=0;i<types.length;++i)
+            result[i] = (TPred)types[i].replace(from, to);
+        return result;
+    }
+    
     public static <T extends Type> Type[] replace(Type[] types, THashMap<TVar, T> map) {
         if(types.length == 0)
             return Type.EMPTY_ARRAY;