@Override
    public AssignGenerator toAssignGenerator(AssignGenerator value) {
      AssignGenerator generator = super.toAssignGenerator(value);
      return generator.withDeclaration(
          scope.inferType(
              generator.declaration(),
              generator.from(),
              InferencePurpose.ASSIGN));
    }
Declare template or invokable. There's no {{@code isDeclared} check because we potentially
might allow to define several templates with the same name but different types of arguments,
to be resolved at runtime. (akin to multimethods). Might need to check if the same
combination of parameters was already used.
@param name identifier
@return resolved type
generator-processor/src/org/immutables/generator/processor/TypeResolver.java