Closed lum1n0us closed 1 year ago
Since $C1
is not exported by $C
, $C1
is a private/encapsulated detail of $C
. To alias $C1
at the point of your comment, $C
needs to (export "C1" (component $C1))
and then you can (alias export $Parent_C "C1" (component $C1))
.
Hope that helps, let me know if you have any other questions.
Thanks a lot.
P.S. The final version is
(component $Parent
(component $C ...
(component $C1 ...)
(export "C1" (component $C1))
)
(component
(alias outer $Parent $C (component $Parent_C))
(instance $p_c (instantiate $Parent_C))
;; alias $C1
(alias export $p_c "C1" (component $Parent_C_C1))
)
)
Expand below by adding a child
$C1
into$C
.Is there a way to alias
$C1
instead of$C
?I am thinkg about
(alias outer $Parent_C $C1 (component $Parent_C_C1))
, but it is wrong because outer parameter Parent_C not found