13 |
redefine |
redefine |
14 |
actual_type, deep_actual_type, context_free_type, |
actual_type, deep_actual_type, context_free_type, |
15 |
associated_class, associated_class_type, conform_to, conformance_type, convert_to, |
associated_class, associated_class_type, conform_to, conformance_type, convert_to, |
16 |
generics, has_associated_class, has_associated_class_type, instantiated_in, duplicate, |
generics, has_associated_class, has_associated_class_type, formal_instantiated_in, |
17 |
|
instantiated_in, duplicate, |
18 |
is_basic, is_expanded, is_external, is_like_current, is_none, is_reference, is_ephemeral, |
is_basic, is_expanded, is_external, is_like_current, is_none, is_reference, is_ephemeral, |
19 |
meta_type, set_actual_type, evaluated_type_in_descendant, is_tuple, |
meta_type, set_actual_type, evaluated_type_in_descendant, is_tuple, |
20 |
set_attached_mark, set_detachable_mark, set_is_implicitly_attached, |
set_attached_mark, set_detachable_mark, set_is_implicitly_attached, |
496 |
end |
end |
497 |
end |
end |
498 |
|
|
499 |
|
formal_instantiated_in (class_type: TYPE_A): TYPE_A |
500 |
|
-- Instantiation of Current in the context of `class_type' |
501 |
|
-- assuming that Current is written in the associated class |
502 |
|
-- of `class_type'. |
503 |
|
local |
504 |
|
t: like Current |
505 |
|
do |
506 |
|
t := twin |
507 |
|
if conformance_type = Void then |
508 |
|
-- When you create an instance of Current, `conformance_type' is not set |
509 |
|
-- and this is what we do when generating the code of CURRENT_B. |
510 |
|
t.set_actual_type (class_type) |
511 |
|
else |
512 |
|
t.set_actual_type (conformance_type.formal_instantiated_in (class_type)) |
513 |
|
end |
514 |
|
Result := t |
515 |
|
end |
516 |
|
|
517 |
instantiated_in (class_type: TYPE_A): TYPE_A |
instantiated_in (class_type: TYPE_A): TYPE_A |
518 |
-- Instantiation of Current in the context of `class_type' |
-- Instantiation of Current in the context of `class_type' |
519 |
-- assuming that Current is written in the associated class |
-- assuming that Current is written in the associated class |