You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And that <M>g__TestLocalAction|0_0 does not have a default value unlike TestMethodAction.
Expected Behavior:
<M>g__TestLocalAction|0_0 should have int a = 2 in its parameter list.
Actual Behavior:
<M>g__TestLocalAction|0_0 does not have int a = 2 in its parameter lists. This becomes a problem for MapAction if it wants to call TestLocalAction with the default parameter value. Delegate.Method.GetParameters()[0].HasDefaultValue ends up returning false instead of true.
Yes. There are a few changes we are taking in this area of making sure that emitted closures / local functions better represent the attributes that were initially placed on them. It's in support of scenarios like MapAction.
Version Used:
master (24 Feb 2021) on sharplab.io
Steps to Reproduce:
View this sharplab.io snippet and observe that this:
results in this:
And that
<M>g__TestLocalAction|0_0
does not have a default value unlikeTestMethodAction
.Expected Behavior:
<M>g__TestLocalAction|0_0
should haveint a = 2
in its parameter list.Actual Behavior:
<M>g__TestLocalAction|0_0
does not haveint a = 2
in its parameter lists. This becomes a problem forMapAction
if it wants to callTestLocalAction
with the default parameter value.Delegate.Method.GetParameters()[0].HasDefaultValue
ends up returning false instead of true.Thanks @Kahbazi for finding this! https://github.com/dotnet/aspnetcore/pull/30434/files#r583502436
The text was updated successfully, but these errors were encountered: