case Assign:
case Declare:
- /* Both must match and not be labels, result is Tnone */
+ /* Both must match and not be labels,
+ * Type must support 'dup',
+ * result is Tnone */
t = propagate_types(b->left, c, ok, NULL, Rnolabel);
if (!b->right)
return Tnone;
if (t)
propagate_types(b->left, c, ok, t, 0);
}
+ if (t && t->dup == NULL) {
+ type_err(c, "error: cannot assign value of type %1", b, t, 0, NULL);
+ *ok = 0;
+ }
return Tnone;
break;