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
Version Used: C# 12, C# 13 (potentially older C# versions as well)
Steps to Reproduce:
Create a blazor component that is setup to leverage the @bind-VariableName syntax that blazor provides, by adding Parameter properties that also have the EditorRequiredAttribute supplied. For example: [Parameter, EditorRequired] public string Value { get; set; }, [Parameter, EditorRequired] public EventCallback<string> ValueChanged { get; set; }, and [Parameter, EditorRequired] public Expression<Func<string>> ValueExpression { get; set; }
Use this blazor component anywhere in the application and use the bind syntax to set the variables <MyComponent @bind-Value="SomeVariable" />
Compiler will produce warning RZ2012 for both the ValueChanged and ValueExpression parameters, which is incorrect since those parameters are being set.
Version Used: C# 12, C# 13 (potentially older C# versions as well)
Steps to Reproduce:
@bind-VariableName
syntax that blazor provides, by addingParameter
properties that also have theEditorRequiredAttribute
supplied. For example:[Parameter, EditorRequired] public string Value { get; set; }
,[Parameter, EditorRequired] public EventCallback<string> ValueChanged { get; set; }
, and[Parameter, EditorRequired] public Expression<Func<string>> ValueExpression { get; set; }
<MyComponent @bind-Value="SomeVariable" />
ValueChanged
andValueExpression
parameters, which is incorrect since those parameters are being set.EX:
SomeInput.razor
App.razor
Diagnostic Id: RZ2012
Expected Behavior: No RZ2012 warning is produced.
Actual Behavior: An RZ2012 warning is produced.
The text was updated successfully, but these errors were encountered: