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

Add implementations for MakePointerType(), MakeArrayType() for GenericTypeParameterBuilder #97350

Merged
merged 15 commits into from
Feb 8, 2024

Conversation

buyaa-n
Copy link
Contributor

@buyaa-n buyaa-n commented Jan 22, 2024

  • Add implementations for MakePointerType(), MakeByRefType(), MakeArrayType() for GenericTypeParameterBuilderImpl
  • Needed to copy some internal API implementation for referencing SymbolType from System.Reflection.Emit
  • Add implementation for GetField(string name, BindingFlags bindingAttr) and GetFields(BindingFlags bindingAttr) for TypeBuilderImpl.
  • Fix bugs found in a broader testing, mostly related to generic type/methods validation and signature

Contributes to #92975

@ghost
Copy link

ghost commented Jan 22, 2024

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Add implementations for MakePointerType(), MakeByRefType(), MakeArrayType() for GenericTypeParameterBuilderImpl
  • Needed to copy some internal API implementation for referencing SymbolType from System.Reflection.Emit
  • Add implementation for TypeBuilderImpl.GetField(string name, BindingFlags bindingAttr)
Author: buyaa-n
Assignees: -
Labels:

area-System.Reflection.Emit

Milestone: -

…ctorInfo reference, remove abstract method validation
@jkotas
Copy link
Member

jkotas commented Feb 3, 2024

remove abstract method validation

Could you please add a test case for the implementing method and the abstract method with different return types, that I have shared with you on Teams? My guess is that the validation in ValidateImplementedMethod is still going to have a problem with it.

@buyaa-n
Copy link
Contributor Author

buyaa-n commented Feb 5, 2024

remove abstract method validation

Could you please add a test case for the implementing method and the abstract method with different return types, that I have shared with you on Teams? My guess is that the validation in ValidateImplementedMethod is still going to have a problem with it.

Added test, it was indeed failing, thank you!

Comment on lines +87 to +90
if (!IsGenericMethod)
{
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

This defers to _method.IsGenericMethod, which seems close to _method.ContainsGenericParameters. Does the latter inform the former?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, _method.ContainsGenericParameters could be true when method is not generic, but the containing type has any open generic parameter.

buyaa-n and others added 2 commits February 5, 2024 17:39
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Copy link
Member

@steveharter steveharter left a comment

Choose a reason for hiding this comment

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

Minor comments added, but otherwise fixes important issues. Thanks!

@buyaa-n
Copy link
Contributor Author

buyaa-n commented Feb 8, 2024

Failures unrelated and known

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

Successfully merging this pull request may close these issues.

4 participants