+ if (!ast_compare_type(field->expression.next, exprs[1])) {
+ char ty1[1024];
+ char ty2[1024];
+ ast_type_to_string(field->expression.next, ty1, sizeof(ty1));
+ ast_type_to_string(exprs[1], ty2, sizeof(ty2));
+ if (opts_standard == COMPILER_QCC &&
+ field->expression.next->expression.vtype == TYPE_FUNCTION &&
+ exprs[1]->expression.vtype == TYPE_FUNCTION)
+ {
+ if (parsewarning(parser, WARN_ASSIGN_FUNCTION_TYPES,
+ "invalid types in assignment: cannot assign %s to %s", ty2, ty1))
+ {
+ parser->errors++;
+ }
+ }
+ else
+ parseerror(parser, "invalid types in assignment: cannot assign %s to %s", ty2, ty1);
+ }
+ }