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

Partial method tests from test plan review #44303

Merged
merged 2 commits into from
May 18, 2020

Conversation

RikkiGibson
Copy link
Contributor

@RikkiGibson RikkiGibson commented May 15, 2020

Related to #43795

Includes tests suggested in test plan review.

@RikkiGibson RikkiGibson added Area-Compilers Test Test failures in roslyn-CI labels May 15, 2020
@RikkiGibson RikkiGibson requested review from a team as code owners May 15, 2020 21:26
@RikkiGibson
Copy link
Contributor Author

@dotnet/roslyn-compiler Please review

}
";

var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails);
Copy link
Member

Choose a reason for hiding this comment

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

verify: Verification.Fails [](start = 148, length = 26)

Why does verification fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the verifier is unhappy that locals are not initialized. This is similar to other SkipLocalsInit tests.

Copy link
Member

Choose a reason for hiding this comment

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

Are we skipping init? If so, why is HasLocalsInit("C.M") returning false?


In reply to: 426860257 [](ancestors = 426860257)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. HasLocalsInit is returning false because we are skipping locals init. Normally it returns true in most cases, except when the method has no locals or when the SkipLocalsInitAttribute has been applied.

}
";

var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails);
Copy link
Member

Choose a reason for hiding this comment

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

TestOptions.UnsafeReleaseDll [](start = 57, length = 28)

Minor point: Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unsafe is required to use SkipLocalsInit

@RikkiGibson RikkiGibson removed request for a team May 18, 2020 19:55
@RikkiGibson RikkiGibson merged commit 07f5bb4 into dotnet:features/partial-methods May 18, 2020
@RikkiGibson RikkiGibson deleted the epm-tests branch May 18, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Test Test failures in roslyn-CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants