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

Remove CS1502 page and redirect to CS1503 page #44421

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

BartoszKlonowski
Copy link
Contributor

@BartoszKlonowski BartoszKlonowski commented Jan 17, 2025

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

📄 File 🔗 Preview link
docs/csharp/language-reference/toc.yml docs/csharp/language-reference/toc
docs/csharp/misc/cs1503.md Compiler Error CS1503

@BartoszKlonowski BartoszKlonowski requested review from BillWagner and a team as code owners January 17, 2025 21:15
@dotnetrepoman dotnetrepoman bot added this to the January 2025 milestone Jan 17, 2025
@dotnet-policy-service dotnet-policy-service bot added okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. dotnet-csharp/svc lang-reference/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Jan 17, 2025
@BillWagner
Copy link
Member

Hi @BartoszKlonowski

I like what you did here so far. I looked at the source, and CS1502 is now commented out: https://github.com/dotnet/roslyn/blob/main/src/Compilers/CSharp/Portable/Errors/ErrorCode.cs#L683

So, the current version of the compiler won't ever generate this error.

If possible, I'll suggest deleting cs1502, and redirecting it to cs1503, including the F1 and helpviewer keywords. If that's more work than you want for this PR, I'll merge this PR as is and create an issue to remove CS1502.

@BartoszKlonowski
Copy link
Contributor Author

Hello @BillWagner, thanks for taking a look!
I always prefer to separate implementations (PRs), but since having it done here is what you suggest then I'm totally fine with this 👍
I'll have that covered yet today.

@BartoszKlonowski BartoszKlonowski changed the title Move code snippet from CS1502 page to CS1503 page Remove CS1502 page and redirect to CS1503 page Jan 21, 2025
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @BartoszKlonowski

I'll :shipit: now.

@BillWagner BillWagner enabled auto-merge (squash) January 21, 2025 16:22
@BillWagner BillWagner merged commit 8121c2a into dotnet:main Jan 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc lang-reference/subsvc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler Error CS1502 Sample Not working
2 participants