List<TypeExpression> types = app.getTypes();
IRubyObject ret = resolveIdentity(template, app.getIdentity());
if (ret != null && ret instanceof RubyClass) {
RubyClass klass = (RubyClass) ret;
ret = graph.newInstanceOf(klass);
ClassType klassType = RuntimeHelper.getClassAnnotation(klass);
TypeVarMap typeVarMap = RuntimeHelper.getTypeVarMap(ret);
if (klassType != null && typeVarMap != null) {
List<TypeVariable> vars = klassType.getTypes();
for (int i = 0; i < vars.size(); i++) {
TypeVariable var = vars.get(i);
if (i < types.size()) {
TypeExpression expr = types.get(i);
TypeSet ts = processMethodReturn(template, classType, expr, receiver);