Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcb310f9 authored by Joe Onorato's avatar Joe Onorato Committed by Mike Lockwood
Browse files

For events, require that the parameters be marked in.

(because they won't work otherwise)
parent f5f4ec97
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -475,6 +475,15 @@ check_method(const char* filename, int kind, method_type* m)
            err = 1;
        }

        if (returnType == EVENT_FAKE_TYPE
                && convert_direction(arg->direction.data) != IN_PARAMETER) {
            fprintf(stderr, "%s:%d parameter %d: '%s %s' All paremeters on events must be 'in'.\n",
                    filename, m->type.type.lineno, index,
                    arg->type.type.data, arg->name.data);
            err = 1;
            goto next;
        }

        if (arg->direction.data == NULL
                && (arg->type.dimension != 0 || t->CanBeOutParameter())) {
            fprintf(stderr, "%s:%d parameter %d: '%s %s' can be an out"