Skip to content
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

RZ2012: False positive for different Blazor binding syntaxes #10553

Closed
igotinfected opened this issue Jun 27, 2024 · 1 comment · Fixed by #10628
Closed

RZ2012: False positive for different Blazor binding syntaxes #10553

igotinfected opened this issue Jun 27, 2024 · 1 comment · Fixed by #10628
Assignees
Labels
area-compiler Umbrella for all compiler issues

Comments

@igotinfected
Copy link

igotinfected commented Jun 27, 2024

Ran into two false positives for RZ2012.

Case @bind-Value

Component.razor

[Parameter, EditorRequired]
public bool Value { get; set; }

[Parameter, EditorRequired]
public EventCallback<bool> ValueChanged { get; set; }

Page.razor

<Component @bind-Value="@_value" />

This will trigger the RZ2012 error for ValueChanged.

Case @bind-Value:get & @bind-Value:set

Component.razor

[Parameter, EditorRequired]
public bool Value { get; set; }

[Parameter, EditorRequired]
public EventCallback<bool> ValueChanged { get; set; }

Page.razor

<Component @bind-Value:get="@_value"
           @bind-Value:set="@SetAsync" />

This will trigger the RZ2012 error for both Value and ValueChanged.

@chsienki
Copy link
Contributor

@jjonescz Looks related to the work you did in this space #8337

Can you take a look? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants