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
Applying make static analyzer in VB removes the Iterator modifier.
Expected behavior
The Shared modifier is added to the method and keeps existing modifiers.
Actual behavior
Shared modifier replaces Iterator modifier.
Additional context
Screen.Recording.2024-10-04.103537.mp4
The text was updated successfully, but these errors were encountered:
CoolCoderSuper
changed the title
Mark members as static removes iterator modifier VB
CA1822 Mark members as static removes iterator modifier VB
Oct 4, 2024
The iterator modifer does not exist in C# and is not recognized here.
I am thinking the best way to do this is to add the Iterator field to DeclarationModifiers.
Unless we would add VB specific logic to analyzer but that would require them having split sources since the analyzer package doesn't directly reference language specific packages and I assume it should stay that way.
Analyzer
Diagnostic ID: CA1822:
Mark members as static
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: SDK 8.0.100
Describe the bug
Applying make static analyzer in VB removes the Iterator modifier.
Expected behavior
The Shared modifier is added to the method and keeps existing modifiers.
Actual behavior
Shared modifier replaces Iterator modifier.
Additional context
Screen.Recording.2024-10-04.103537.mp4
The text was updated successfully, but these errors were encountered: