Move code snippet from CS1502 page to CS1503 page #44421
+24
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request closes #43993
It moves the code snippet that was implemented for CS1502 to the error page of CS1503.
Page of CS1503 has no code sample that presents the error while indeed, current code sample presents CS1503 instead of CS1502.
The only problem is that I was unable to reproduce the CS1502 to implement any code sample for the CS1502 page. I also tried to utilize code reported in other websites, but no luck, only CS1503 was given by static analysis.
I also found this:
dotnet/runtime#25176 (comment)
that says that CS1503 will be prioritized over CS1502, but I was unable to find anything else. Still, indeed I was able to reproduce the CS1502 error but only as an exception during runtime, not by error of static analysis.
Due to that, I left the CS1502 error page without a code sample.
Internal previews