injected entities can be found both by unqualified and qualified lookup as if actually defined in the module, however the denoted entities are not actually part of the module, and in particular they're bound in the context in which they're actually defined.
There are two forms of the rename statement, one for non-functions and one for functions. The non-function form injects a reference to a single non-function entity.
The function form injects a complete overload set. Additional overloads can be added to the set, either by local definitions, or further inherit statements.
Note that unlike open or use directives, injected names have the same priority as other names defined in the module: any collision with a locally defined function is final, and cannot be resolved.
1: header "#include <iostream>"; 2: module X { 3: type x_t = "int"; 4: const x42 : x_t = "42"; 5: } 6: 7: module Y { 8: rename y_t = X::x_t; 9: rename y42=X::x42; 10: proc print:y_t = "std::cout << $1 << std::endl;"; 11: } 12: 13: Y::print X::x42; 14: Y::print Y::y42; 15: 16: rename fun print=Y::print; 17: rename y42=Y::y42; 18: rename x42=X::x42; 19: 20: print x42; 21: print y42; 22: