forked from dotnet/roslyn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into features/function…
…-pointers * upstream/master: (207 commits) Update argument state when parameter has not-null type (dotnet#46072) Fix TypeWithAnnotations.ToTypeWithState() for (untyped) null literal (dotnet#46344) Update README (dotnet#46136) Revert "Revert "Support nullable annotations on unconstrained type parameters"" Revert "Support nullable annotations on unconstrained type parameters (dotnet#45993)" Fix type in publish data Update VSIXExpInstaller version to one available on ADO Update publish data for 16.8 Update version of RichCodeNav.EnvVarDump A fixed initializer must be bound to its natural type (dotnet#46293) Update features merged into 16.7p4 (dotnet#46229) Async-streams: disposal should continue without jump within a finally (dotnet#46188) Recommend default in type constraint, but not record (dotnet#46311) Add use site diagnostics to IsUnmanaged (dotnet#46114) Add another flaky test. Ensure NuGet connections use TLS 1.2 Update to Microsoft.CodeAnalysis.Testing 1.0.1-beta1.20374.2 Skip flaky test. Fix build break. (dotnet#46303) Skip a flaky test Relates to dotnet#46304 ...
- Loading branch information
Showing
923 changed files
with
31,255 additions
and
14,900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
# /warnversion warning "waves" | ||
# /warn warning "waves" | ||
|
||
The C# compiler flag `/warnversion` controls optional warnings. | ||
The C# compiler flag `/warn` controls optional warnings. | ||
When we introduce new warnings that can be reported on existing code, | ||
we do so under an opt-in system so that programmers do not see new warnings | ||
without taking action to enable them. | ||
For that purpose, we have introduced the compiler flag "`/warnversion=n`" | ||
where `n` is a whole number or a decimal number. | ||
For a warning that was introduced in dotnet version `k`, | ||
that warning will be produced if the warning version `n` specified when compiling is | ||
greater than or equal to `k` and a compiler shipped with dotnet version | ||
`k` or later is used to compile the code. | ||
For that purpose, we have the compiler flag "`/warn:n`" | ||
where `n` is a whole number. | ||
|
||
The compiler shipped with dotnet 5 (the C# 9 compiler) contains some warnings, documented below, that | ||
are reported only under `/warn:5` or higher. | ||
|
||
The default warning level when the command-line compiler is used is `4`. | ||
|
||
The default warning version is `0` (produce no optional warnings). | ||
Our first warning under control of `/warnversion` was introduced in version `5` | ||
as part of .NET 5. | ||
If you want the compiler to produce all applicable warnings, you can specify | ||
`/warnversion=9999`. | ||
In the project file, the property used to specify the warning version is `AnalysisLevel`. | ||
`/warn:9999`. | ||
|
||
The table below describes all of the warnings controlled by `/warnversion`. | ||
The table below describes all of the warnings controlled by warning levels `5` or greater. | ||
|
||
| Warning ID | warnversion | Description | | ||
| Warning ID | warning level | Description | | ||
|------------|---------|-------------| | ||
| CS7023 | 5 | [A static type is used in an 'is' or 'as' expression](https://github.com/dotnet/roslyn/issues/30198) | | ||
| CS8073 | 5 | [Expression always true (or false) when comparing a struct to null](https://github.com/dotnet/roslyn/issues/45744) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.