Multiple constraints
Description
New multiple constraints for generic parameters
With the new ECMA standard for Eiffel multiple constraints for generic parameters were introduced.
class GENERIC_CLASS [G -> {B, C }] feature f: G example is -- issue do -- Qualified feature call f.a end end |
The semantic given to the code above is, that an actual parameter passed for G must be conform to both classes: B and C.
The standard defines in section 8.12.23 what the basic type of such a multiple constraint formal generic is. However, this definition can only be used to clearly define the set of available features to G and not the semantic of a qualified feature call like f.a.