Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Self references in abi generated code #973

Conversation

miraclx
Copy link
Contributor

@miraclx miraclx commented Nov 24, 2022

Partially resolves #972. But I already don't like this approach.

For one, it only works for -> Self, -> Vec<Self> and -> Result<..Self..>.

Whereas, we need it to work recursively. Regardless of type or depth.

Consider something like: Result<Option<Vec<(Self, Self)>>, Self> or user-defined typed generics.

An alternative might just be to cast to string, and replace all occurrences of Self with #ty, but this is another can of worms.

@miraclx miraclx changed the title fix __abi-embed compilation error fix: Self references in abi generated code Nov 24, 2022
@miraclx miraclx closed this Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant