-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Handle generic types as parameters of attributes in MetadataDecoder
#70151
Conversation
8a29dff
to
d280b1e
Compare
src/Compilers/CSharp/Portable/Symbols/Attributes/PEAttributeData.cs
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Test/Emit/Attributes/AttributeTests.vb
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Symbols/Attributes/PEAttributeData.cs
Outdated
Show resolved
Hide resolved
Done with review pass (commit 1) |
This reverts commit d280b1e except tests.
Done with review pass (commit 4), tests are not looked at. |
src/Compilers/CSharp/Portable/Symbols/Source/SourceAssemblySymbol.cs
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/Metadata/PE/PEAssemblySymbol.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/Metadata/PE/PEAssemblySymbol.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/Source/SourceAssemblySymbol.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/Source/SourceModuleSymbol.vb
Outdated
Show resolved
Hide resolved
Done with review pass (commit 23) |
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 25)
@dotnet/roslyn-compiler For the second review |
@dotnet/roslyn-compiler For the second review |
@333fred PTAL |
@333fred, @dotnet/roslyn-compiler For the second review |
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.
Generally looks good, but I have a question on the structure of the new methods.
Fixes #66370.
Fixes #55190.
PEAttributeData
has the attribute symbol, so this PR changesMetadataDecoder
to use attribute argument types from that symbol (instead of reading the metadata directly), hence all cases are handled - including the previously missing generic type parameters.PIA attribute validation has also been refactored. Previously, it decoded attributes in all cases, now it does that only for
SourceAssemblySymbol
s; whereas it consults metadata directly forPEAssemblySymbol
s. See #70151 (comment).