if (string.width(x)) error("String contains wide characters.\n");
Find two errors. :-)
Oops... :-)
True, I forgot that I had removed the forced private of the getter/setter functions. From program.c:
/* NOTE: The function needs to have the same PRIVATE/INLINE * behaviour as the variable for overloading to behave * as expected. * * FIXME: Force PRIVATE? */
This is somewhat confusing to me. "The variable"? The setter is for "x", which is not declared as a variable. And if you were to make the setter private, wouldn't that make it impossible for B to override it in the first place?
The declaration of a getter or setter function implicitly defines a variable with run-time storage type PIKE_T_GET_SET. The implicit variable derives its modifiers from the modifiers of the getter and setter functions. Forcing the setter function private would mean that it could only be accessed via the variable, in which case the inh::var syntax mentioned earlier would be necessary.