Repository navigation
Require SizeConst for UnmanagedType.ByValArray - #68992
Conversation
…o require it when decoding instead of defaulting to length 1.
|
@jaredpar @AlekseyTs can I get another review pass? |
| switch (code) | ||
| { | ||
| case ErrorCode.WRN_AddressOfInAsync: | ||
| case ErrorCode.WRN_ByValArraySizeConstRequired: |
There was a problem hiding this comment.
Instead of modifying attributes in this test, we should assert the warnings. Otherwise we are not verifying metadata emitted for the affected scenario. In reply to: 1644180537 Refers to: src/Compilers/CSharp/Test/Emit2/Attributes/AttributeTests_MarshalAs.cs:565 in 60d535c. [](commit_id = 60d535c, deletion_comment = False) |
Also should test that the warning is suppressed if In reply to: 1644180537 Refers to: src/Compilers/CSharp/Test/Emit2/Attributes/AttributeTests_MarshalAs.cs:565 in 60d535c. [](commit_id = 60d535c, deletion_comment = False) |
We should check if any diagnostic is reported for similar VB test. In reply to: 1644195564 Refers to: src/Compilers/CSharp/Test/Emit2/Attributes/AttributeTests_MarshalAs.cs:565 in 60d535c. [](commit_id = 60d535c, deletion_comment = False) |
|
Done with review pass (commit 10) |
|
@dotnet/roslyn-compiler For the second review |
|
@jkoritzinsky can you get the merge conflicts fixed and then we should be good to merge. |
MarshalAsAttribute.SizeConstis required by all runtimes forUnmanagedType.ByValArray, so warn when it is not provided.As mentioned below, we cannot make it an error due to back-compat.
Fixes #68988
Fixes dotnet/runtime#36134