Skip to content

Warn when an @ is optional in an attribute value #9740

Open
@davidwengier

Description

@davidwengier

See dotnet/aspire#1449 for context, but in general there is code like:

<Component OnSomeEvent="DoSomething(context)" />

and the user changed it to:

<Component OnSomeEvent="@DoSomething(context)" />

This seemed to have no effect, but nobody is really sure what the rules are for whether the @ is necessary in this context or not. It would be great if the compiler could warn when it expects a C# expression, and encounters a C# implicit expression.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions