August
2004-10-25 02:43:18 UTC
Hello all,
Consider the following two modules:
MODULE M0;
TYPE T0* = RECORD x: INTEGER END;
END M0.
MODULE M1;
IMPORT M0;
TYPE T1 = RECORD (M0.T0) x: REAL END;
END M1.
If I compile the modules with the OOC compiler everything works fine,
but with the XDS compiler I get an error message about x allready
being defined in T0. According to "The Programming Language Oberon-2",
section 6.3 about record types:
"If a record type is exported, field identifiers that are to be
visible outside the declaring module must be marked. They are called
`public fields'; unmarked elements are called `private fields'."
It further says that:
"All identifiers declared in the extended record must be different
from the identifiers declared in its base type record(s)."
(Note the absence of "public" before the second occurence of
"identifiers").
So which compiler is the faulty one?
Regards,
August
Consider the following two modules:
MODULE M0;
TYPE T0* = RECORD x: INTEGER END;
END M0.
MODULE M1;
IMPORT M0;
TYPE T1 = RECORD (M0.T0) x: REAL END;
END M1.
If I compile the modules with the OOC compiler everything works fine,
but with the XDS compiler I get an error message about x allready
being defined in T0. According to "The Programming Language Oberon-2",
section 6.3 about record types:
"If a record type is exported, field identifiers that are to be
visible outside the declaring module must be marked. They are called
`public fields'; unmarked elements are called `private fields'."
It further says that:
"All identifiers declared in the extended record must be different
from the identifiers declared in its base type record(s)."
(Note the absence of "public" before the second occurence of
"identifiers").
So which compiler is the faulty one?
Regards,
August