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

[MethodImpl(MethodImplOptions.AggressiveInlining)] does not handle methods defined by arrow expressions #1209

Open
Hecate2 opened this issue Oct 22, 2024 · 0 comments · May be fixed by #1211

Comments

@Hecate2
Copy link
Contributor

Hecate2 commented Oct 22, 2024

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static ByteString MyMethod(object foo) => StdLib.Serialize((foo, bar));

https://github.com/Hecate2/neo-devpack-dotnet/blob/add21354263b658f46c66b4738d0296c08fb3b7d/src/Neo.Compiler.CSharp/MethodConvert/Helpers/ConvertHelpers.cs#L45
syntax.Body is null for this case, because no explicit method body is defined in a BlockSyntax {}.
syntax.ExpressionBody may be useful for such cases, but I do not know how to compile the method for now.

@Jim8y Jim8y linked a pull request Oct 22, 2024 that will close this issue
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 a pull request may close this issue.

1 participant