-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Partial method tests from test plan review #44303
Conversation
@dotnet/roslyn-compiler Please review |
} | ||
"; | ||
|
||
var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Related to #43795
Includes tests suggested in test plan review.