-
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
Emit extension marker method as public #73994
Conversation
if (constructorHandle.Kind == HandleKind.MemberReference) | ||
{ | ||
var typeRef = metadataReader.GetMemberReference((MemberReferenceHandle)constructorHandle).Parent; | ||
return metadataReader.GetTypeReference((TypeReferenceHandle)typeRef).Name; |
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.
Strictly speaking this cast isn't always valid, I think. From spec for MemberRef metadata table: "Class (an index into the MethodDef, ModuleRef,TypeDef, TypeRef, or TypeSpec
tables; more precisely, a MemberRefParent (§II.24.2.6) coded index)." I am not going to block on this because the change is for a test helper, it is an improvement and it is sufficient for the test scenarios we currently have.
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.
LGTM (commit 2)
Since we need the marker to roundtrip through reference assemblies, it should not be
private
.Since the name is already unspeakable, I chose
public
accessibility.Added a PROTOTYPE marker to record that the synthesized method is still not properly emitted in reference assemblies.
Corresponding spec update: dotnet/csharplang#8121
Relates to test plan #66722