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 inline for null body method #1211

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Oct 22, 2024

this pr fixes #1209

@Hecate2
Copy link
Contributor

Hecate2 commented Oct 23, 2024

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        private static void ArrowInline(int a, int b) => CallMethodThatReturnsInt(a, b);

The compiler should drop the returned value in this case.

shargon
shargon previously approved these changes Oct 23, 2024
@shargon
Copy link
Member

shargon commented Oct 23, 2024

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        private static void ArrowInline(int a, int b) => CallMethodThatReturnsInt(a, b);

The compiler should drop the returned value in this case.

If it's private yes, if it's public... Maybe we can create a new issue for it

[TestMethod]
public void Test_ArrowMethod()
{
Assert.AreEqual(new BigInteger(3), Contract.ArrowMethod());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

artifacts not updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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