Conversation
don't get the property on the array type but on the element type - fixes #25819
| else | ||
| il.Emit(Ldarg_0); | ||
| var lastGetterTypeRef = properties[i - 1].property.PropertyType; | ||
| var lastGetterTypeRef = properties[i - 1].property?.PropertyType; |
There was a problem hiding this comment.
this and the next change are preventing the NRE reported as the issue
| } | ||
| else | ||
| { | ||
| if (previousPartTypeRef.IsArray) |
There was a problem hiding this comment.
this makes it produce valid, executable, and correct code
mattleibow
left a comment
There was a problem hiding this comment.
LGTM
With regards to the fix, is the first one fixing the issue, but the second chunk just stopping the crash even if we didn't fix it so we would rather have code that does nothing/something instead of crashing?
both are needed. the reported exception was a NRE, and the code should go through that null ref to end up on the actual fix. This is all strange, as this used to work, but the capability was somehow broken at some point, and we didn't had test for that part |
Description of Change
don't get the property on the array type but on the element type
Issues Fixed