fix error message
authorMichael Wallner <mike@php.net>
Wed, 31 Oct 2018 10:10:58 +0000 (11:10 +0100)
committerMichael Wallner <mike@php.net>
Wed, 31 Oct 2018 10:10:58 +0000 (11:10 +0100)
src/types/decl_arg.c

index 774d3029565f2548e03c7d30a1c434fc51b690eb..9f487c3dba4045ebe714eaf2be6733b8e0fc4dd7 100644 (file)
@@ -118,8 +118,10 @@ bool psi_decl_arg_validate(struct psi_data *data, struct psi_decl_arg *arg,
        if (!psi_decl_type_validate(data, arg->type, NULL, scope)) {
                 if (!arg->var->pointer_level) {
                        data->error(data, arg->type->token, PSI_WARNING,
-                                       "Cannot use '%s' as type for '%s'%s%s", arg->type->name,
-                                       arg->var->name, *data->last_error ? ": " : "", data->last_error);
+                                       "Cannot use '%s' as type for '%s'%s%s",
+                                       arg->type->name->val,
+                                       arg->var->name->val,
+                                       *data->last_error ? ": " : "", data->last_error);
                        return false;
                 }
        }