redefining an aliased feature?

2 messages Options
Embed this post
Permalink
Jimmy Johnson

redefining an aliased feature?

Reply Threaded More More options
Print post
Permalink
Given the feature[s] below from ARRAY:

  item alias "[]", at alias "@" (i: INTEGER): G assign put

Can a redefinition of `item' be simply:
  item (i: INTEGER): G
or must the alias be included or does the bracket operator follow the redefinition?

Must the assigner part be included?

I assume `item' and `at' are synonyms and *both* must be redefined if they are to keep identical meanings?

thanks,

jjj

Emmanuel Stapf

RE: redefining an aliased feature?

Reply Threaded More More options
Print post
Permalink
> Given the feature[s] below from ARRAY:
>
>   item alias "[]", at alias "@" (i: INTEGER): G assign put
>
> Can a redefinition of `item' be simply:
>   item (i: INTEGER): G
> or must the alias be included or does the bracket operator follow the
> redefinition?
>
> Must the assigner part be included?

Yes it should. If you do not want to keep it, then you have to add a renaming
clause `item as item' when inheriting from ARRAY.
 
> I assume `item' and `at' are synonyms and *both* must be redefined if
> they are to keep identical meanings?

That's correct.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------