-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Conversation
…cTypeParameterBuilder
Tagging subscribers to this area: @dotnet/area-system-reflection-emit Issue Details
|
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
Outdated
Show resolved
Hide resolved
3983557
to
5143dc6
Compare
…nce, add more test and other implementations
80122ec
to
d07377c
Compare
...s/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorOnTypeBuilderInstantiation.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ParameterBuilderImpl.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs
Show resolved
Hide resolved
…ctorInfo reference, 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 |
…eturning different type on method override
Added test, it was indeed failing, thank you! |
if (!IsGenericMethod) | ||
{ | ||
return false; | ||
} |
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.
This defers to _method.IsGenericMethod
, which seems close to _method.ContainsGenericParameters
. Does the latter inform the former?
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.
No, _method.ContainsGenericParameters
could be true when method is not generic, but the containing type has any open generic parameter.
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/FieldBuilderImpl.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
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.
Minor comments added, but otherwise fixes important issues. Thanks!
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ArrayMethod.cs
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ArrayMethod.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ArrayMethod.cs
Outdated
Show resolved
Hide resolved
...braries/System.Reflection.Emit/src/System/Reflection/Emit/GenericTypeParameterBuilderImpl.cs
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs
Show resolved
Hide resolved
.../System.Reflection.Emit/tests/PersistableAssemblyBuilder/AssemblySaveTypeBuilderAPIsTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ILGeneratorImpl.cs
Outdated
Show resolved
Hide resolved
Failures unrelated and known |
MakePointerType()
,MakeByRefType()
,MakeArrayType()
forGenericTypeParameterBuilderImpl
SymbolType
fromSystem.Reflection.Emit
GetField(string name, BindingFlags bindingAttr)
andGetFields(BindingFlags bindingAttr)
for TypeBuilderImpl.Contributes to #92975