Thamm, Russell wrote:
The three following files show two apparent bugs:
- The compiler seems to get confused between a standard procedure and an
object method with the same name.
Yes, that's true. I came across this problem as well recently.
- Types declared in other units are still problematical. Comment out
procedure aaa in unit 1. Now the main program fails to compile:
Error Incompatible type for argument 2 of Twoobj_Bbb.
Hmpf... this problem was fixed for schema, pointer and record types, but apparently not for enum types. :-( I added it to the bug list. Anyway, Peter is working on a new GPI format which will hopefully get rid of this kind of bugs (there are a few more of them) altogether...
I can't even seem to find a workaround for this (apart from abandoning the user-defined type).
Perhaps some type-casting to Integer and back will help, but it's not nice...
Perhaps it's better, until the bug is fixed, to turn the enum type into an integer:
type RRtype = Integer;
const rr_one = 0; rr_two = 1; ...
Not very nice, either, but then there's ugliness only in one place -- but of course, you lose some degree of type-safety...
Frank
-- Frank Heckenbach, frank@fjf.gnu.de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan