dotnet / dotnet/csharpstandard

Expression-bodied members vs. expressions that return nothing

Offen
#369 10 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @jskeet Auf GitHub ansehen
type: bug
Vorherrschende Sprache
C#
Sterne
815
Forks
99
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
16

Beschreibung

v6 introduces expression-bodied members, v7 will introduce expression-bodied finalisers. In the former case result of the *expression* of the body may be classified as nothing (§12.2.1) if the return type of the method is `void`; in the latter case it may be the case that the result type *must* be classified as nothing.

The introduction of at least the above two kinds of expression bodied members extends the places expressions whose result is classified as nothing may occur: §12.2.1 requires updating for v6 (and again for v7); it *may* impact how null conditionals are specified (PR #7, #251); and there could well be other places…

Let the hunt begin!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.