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

Adjust wording for ERR_ExpressionVariableInConstructorOrFieldInitializer error #13528

Closed
AlekseyTs opened this issue Sep 1, 2016 · 0 comments · Fixed by #13564
Closed

Adjust wording for ERR_ExpressionVariableInConstructorOrFieldInitializer error #13528

AlekseyTs opened this issue Sep 1, 2016 · 0 comments · Fixed by #13564

Comments

@AlekseyTs
Copy link
Contributor

+  <data name="ERR_ExpressionVariableInConstructorOrFieldInitializer" xml:space="preserve">
+    <value>Out variable or pattern variable declarations are not allowed within constructor/field/auto-implemented property initializers.</value>

From @cston:
Consider separating cases with comma for consistency with other errors. And remove auto-implemented if not necessary. Perhaps: ... not allowed within constructors, field initializers, or property initializers.

From @gafter:
Also, I believe the first "or" should be "and" (they are both forbidden), so I suggest

Out variable and pattern variable declarations are not allowed within constructor initializers, field initializers, or property initializers.

This is long-winded enough that you could consider specializing it.

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