[Oberon] Case statements containing base type labels
August Karlstrom
fusionfile at gmail.com
Mon Aug 28 12:42:04 CEST 2023
Given the declarations
Shape = RECORD x, y: REAL END
Rectangle = RECORD (Shape) w, h: REAL END
Circle = RECORD (Shape) r: REAL END
does a case statement containing labels for all three types have well
defined behavior?
CASE s OF
Rectangle: ... |
Circle: ... |
Shape: ...
END
In this case a rectangle and a circle respectively is also a shape so
it's not clear what label is selected and the order of the labels should
not matter.
Regards,
August
More information about the Oberon
mailing list