X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftypes%2FTypes.java;h=f793754eed215be13e6ead654b115dac722b5df2;hb=refs%2Fchanges%2F75%2F275%2F2;hp=b20ee9f121ba4890be21b58e53540de72b4a1a6a;hpb=8561e498009a25473db94b0e667866aa79de90b1;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java index b20ee9f12..f793754ee 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java @@ -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 Type[] replace(Type[] types, THashMap map) { if(types.length == 0) return Type.EMPTY_ARRAY;