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=bf540e621923947f9d6f4d5eeef5d05f08373125;hp=b20ee9f121ba4890be21b58e53540de72b4a1a6a;hpb=ca40974f87c9db00eb77aaf1acc1e9937b37261b;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;