On Monday, 30 January 2017 15:35:01 UTC+2, August Karlstrom wrote:
Assuming that T is a record type, is this valid Oberon code?
PROCEDURE P(VAR x: T);
VAR y: T;
BEGIN
x := y
END P
If yes, should the program trap if the actual parameter x has a type
which is a proper extension of T?
-- August
Hi August,
Just for information - in my Oberon compiler, I know from experience that the example code will compile fine, but tends to give a type error at runtime when the assign occurs, especially with complex record variables. I am not sure why this is, I haven'
t yet had the time or energy to debug the generated machine code to check why the type tags don't match (it is not entirely trivial to debug with record variables, it becomes quite a complex exercise).
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)