Difference between revisions of "New CAT call"
m |
m (→Introcution) |
||
Line 4: | Line 4: | ||
{|border="0" cellpadding="2" cellspacing="0" align="center" | {|border="0" cellpadding="2" cellspacing="0" align="center" | ||
|-valign="top" -halign="center" | |-valign="top" -halign="center" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| | | | ||
<code>[eiffel, n] | <code>[eiffel, n] | ||
Line 28: | Line 16: | ||
f (a: STRING) do end -- not valid | f (a: STRING) do end -- not valid | ||
</code> | </code> | ||
− | | | + | | |
<code>[eiffel, n] | <code>[eiffel, n] | ||
class B | class B | ||
Line 34: | Line 22: | ||
f (a: ?STRING) do end -- valid | f (a: ?STRING) do end -- valid | ||
</code> | </code> | ||
+ | |} |
Revision as of 11:11, 27 October 2006
Introcution
The ECMA standard introduces a new solution to the CAT call problem. Covariant redefinition of a formal argument is only possible to an detatchable type:
class A feature f (a: ANY) do end |
class B feature f (a: STRING) do end -- not valid |
class B feature f (a: ?STRING) do end -- valid |