(Tuple<Type> types, java.util.function.Function<Object, Syntactic.Item> binding)
| 6923 | } |
| 6924 | |
| 6925 | private static Tuple<Type> substitute(Tuple<Type> types, |
| 6926 | java.util.function.Function<Object, Syntactic.Item> binding) { |
| 6927 | for (int i = 0; i != types.size(); ++i) { |
| 6928 | Type before = types.get(i); |
| 6929 | Type after = before.substitute(binding); |
| 6930 | if (before != after) { |
| 6931 | // Committed to change |
| 6932 | Type[] nTypes = new Type[types.size()]; |
| 6933 | for (int j = 0; j != nTypes.length; ++j) { |
| 6934 | after = types.get(j).substitute(binding); |
| 6935 | if(after == null) { |
| 6936 | return null; |
| 6937 | } |
| 6938 | nTypes[j] = after; |
| 6939 | } |
| 6940 | return new Tuple<>(nTypes); |
| 6941 | } |
| 6942 | } |
| 6943 | // |
| 6944 | return types; |
| 6945 | } |
| 6946 | |
| 6947 | private static Type[] substitute(Type[] types, java.util.function.Function<Object, Syntactic.Item> binding) { |
| 6948 | Type[] nTypes = types; |
no test coverage detected