No, the quoted RM part just says that the prefixed call notation
(object.operation) is available /only/ when there is no (visible)
component that has the same name as the operation. If there is a
(visible) component with the same name, then the component effectively
hides the operation, in the
object.name syntax.
So the program is legal. However, it may not work as the programmer
intended. An optional compiler warning could be helpful.
This really seems too much of a trap to accept silently. Just for
example, suppose there is a class hierarchy, and Ob is an object of some
derived type, and Foo some primitive operation of this derived type. The
meaning of Ob.Foo then depends on whether or not some level of the
hierarchy adds a component Foo to the type, and whether the component is
visible or not. Yuck! Most cases of confusion will probably be caught by
some type mismatch (or lack of actual parameters), but some will pass
undetected by the compiler.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .