When concretizing interfaces (finding the appropriate implementation at
a call site) we previously set the lookup mode of all such resolved
symbols to CarpLand AFunction. This incorrectly overwrites the lookup
mode of Externally registered types, causing them to emit incorrect C
when the user specifies an override.
We now preserve whatever lookup mode is assigned to the implementation
the concretization resolves the interface to. This not only fixes the
external override emission issue, but should be more correct in general.
When concretizing interfaces (finding the appropriate implementation at a call site) we previously set the lookup mode of all such resolved symbols to CarpLand AFunction. This incorrectly overwrites the lookup mode of Externally registered types, causing them to emit incorrect C when the user specifies an override.
We now preserve whatever lookup mode is assigned to the implementation the concretization resolves the interface to. This not only fixes the external override emission issue, but should be more correct in general.
fixes https://github.com/carp-lang/Carp/issues/1414