You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was intentional, to avoid noisyness. An empty primary constructor doesn't really help at all, since there are no parameters to capture or assign to fields.
Maybe a better fix for this, rather than offering to convert to a primary constructor, should just be to remove the default public parameterless constructor completely?
An empty primary constructor doesn't really help at all, since there are no parameters to capture or assign to fields.
If such constructor has attributes, it might be benifitial to make it a primary one. A common example pattern is an osbolete MEF import constructors in roslyn
Version Used:
Compiler version: 4.10.0-3.24230.3
(abc35d6)Steps to Reproduce:
Diagnostic Id: IDE0290
Expected Behavior:
IDE0290 "Use primary constructor" diagnostic is raised.
Actual Behavior:
No diagnostic is raised.
Other notes
Just adding a parameter to the constructor:
causes the diagnostic be raised.
The text was updated successfully, but these errors were encountered: