Difference between revisions of "New CAT call"
m (→Introcution) |
m (→Introcution) |
||
Line 13: | Line 13: | ||
| | | | ||
<code>[eiffel, n] | <code>[eiffel, n] | ||
− | class | + | class B1 |
inherit A redefine f end | inherit A redefine f end | ||
feature | feature | ||
Line 21: | Line 21: | ||
| | | | ||
<code>[eiffel, n] | <code>[eiffel, n] | ||
− | class | + | class B2 |
inherit A redefine f end | inherit A redefine f end | ||
feature | feature |
Revision as of 11:12, 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 end |
class B1 inherit A redefine f end feature f (a: STRING) do end -- not valid end |
class B2 inherit A redefine f end feature f (a: ?STRING) do end -- valid end |