equal
deleted
inserted
replaced
211 } |
211 } |
212 } |
212 } |
213 |
213 |
214 /** compute a type substitution on 't' given a list of type mappings */ |
214 /** compute a type substitution on 't' given a list of type mappings */ |
215 public Type subst(Type t, Mapping... maps) { |
215 public Type subst(Type t, Mapping... maps) { |
216 ListBuffer<Type> from = ListBuffer.lb(); |
216 ListBuffer<Type> from = new ListBuffer<>(); |
217 ListBuffer<Type> to = ListBuffer.lb(); |
217 ListBuffer<Type> to = new ListBuffer<>(); |
218 for (Mapping tm : maps) { |
218 for (Mapping tm : maps) { |
219 from.append(tm.from); |
219 from.append(tm.from); |
220 to.append(tm.to); |
220 to.append(tm.to); |
221 } |
221 } |
222 return types.subst(t, from.toList(), to.toList()); |
222 return types.subst(t, from.toList(), to.toList()); |