X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Ftypes%2Fconst.c;h=627707078b289af3a4365c18234070f55befb08b;hp=fd1a165ee65841943e1667138866da8e0c27f58d;hb=2d34b0c215608bc3eae007ce5f4e80eae3c1e147;hpb=a0f437f26cd0f121ee911a55327a68a3544bf15f diff --git a/src/types/const.c b/src/types/const.c index fd1a165..6277070 100644 --- a/src/types/const.c +++ b/src/types/const.c @@ -69,22 +69,6 @@ void psi_const_dump(struct psi_dump *dump, struct psi_const *cnst) bool psi_const_validate(struct psi_data *data, struct psi_const *c, struct psi_validate_scope *scope) { - if (c->type) { - switch (c->type->type) { - case PSI_T_BOOL: - case PSI_T_INT: - case PSI_T_FLOAT: - case PSI_T_DOUBLE: - case PSI_T_STRING: - break; - default: - data->error(data, val->token, PSI_WARNING, - "Invalid default value type '%s', " - "expected one of bool, int, float/double or string.", - type->name->val); - return false; - } - } if (!psi_impl_def_val_validate(data, c->val, c->type, scope)) { return false; }