-
Notifications
You must be signed in to change notification settings - Fork 204
compiler errors without squiggling when attribute contains @() blocks without space #9985
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
Comments
This would be tooling, but looks to me like the compiler shouldn't be erroring on this, or perhaps should be offering a better RZ diagnostic if this scenario isn't supported, so moving to compiler to have a first look. |
I think the compiler's behavior here is by design - all consecutive C# expressions are concatenated and treated as one expression. For example, <input value="@(1+)@(2)" /> will render as <input value="3" /> Changing that would be a breaking change. So in the original example, |
That is bizarre and scary, I had no idea. Would love to see that change in a warning wave, as I can see why someone might want
|
@phil-allen-msft Compiler is working as expected, so moving to tooling for triage of the squiggles not showing. |
In a razor file, i have an element with an attribute, and in that, there are two @() blocks containing something - if those blocks aren't separated by a string, compilation fails, but there's no squiggle in the editor. See screenshot

The text was updated successfully, but these errors were encountered: