Add test for nested template types #1479
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems that generating a type with a member function that uses a reference to a typedef of a templated type causes autocxx to interpret the class with the typedef member as a namespace.
The
extern "C++"
generated the following from the submitted test case:Which I believe is what causes the downstream issue that gets reported in the test failure:
I tried poking around
RsCodeGenerator::generate_cxxbridge_type
, which is where I think the actual generation of the buggy#[namespace = "B"]
is coming from, but I don't really understand enough about how the namespace is being parsed to suggest a fix.Maybe this is a known issue? There's some comments scattered around the source that seem to imply that some tricks are being done to handle nested types.
May be related to #1350