Skip to content

@bind does not check if the parameter exists #13125

Description

@MarvinKlein1508

@davidwengier

Another strange thing in razor. You can bind to literally anything. Visual Studio is not checking whether the bound value is an actual parameter of the component.

See:
Image

This has driven me crazy in a recent migration because a component library has changed it's parameter name from @bind-SelectedOptions to @bind-SelectedItems the code will compile fine but it'S strange that you can bind to something which doesn't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-compilerUmbrella for all compiler issuesrequires-warning-wavesA feature or bug that would be a breaking change without warning waves

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions