Repository navigation
Fix Type.IsPublic for pointer and byref types - #65156
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsFixes #12355 Type.IsPublic returns false for pointer and byref types generated from a public type. Because
|
760ec25 to
b6aa2c8
Compare
b6aa2c8 to
11076ec
Compare
steveharter
left a comment
There was a problem hiding this comment.
LGTM; some minor test feedback
|
@buyaa-n note some CI failures with the new tests |
|
Does System.Reflection.MetadataLoadContext need this fix as well? |
Looking, thanks
Will check, thanks |
|
A question about the CI test failure: for runtime/src/mono/mono/metadata/icall.c Lines 1805 to 1806 in f1337d9 I beleive we need same behavior for this, but i am not sure which value is expected, I guess it should be public, but want to confirm, please let me know what you think @steveharter @jkotas @GrabYourPitchforks @lambdageek |
MLC just returning |
The value of |
Right 0, so it was same as what runtime/src/coreclr/vm/runtimehandles.cpp Lines 809 to 815 in 4c2ea7e |
8dce35f to
0b042b8
Compare
c721a18 to
a17a004
Compare
|
Thank you all the your review and suggestions! Build failure unrelated, merging |
Fixes #12355
Type.IsPublic returns false for pointer and byref types generated from a public type. Because
RuntimeTypeHandle::GetAttributesreturns 0 (NotPublic) for TypeDesc types (except generic type variables). Updated the code to return attributes from underlying element type (for pointer and byref types only)