Skip to content

Commit

Permalink
Refine diagnostic for switch expression that is not exhaustive (#38714)
Browse files Browse the repository at this point in the history
Fixes #38571
  • Loading branch information
Neal Gafter authored Sep 20, 2019
1 parent 5b95fa0 commit 35cc9bb
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 80 deletions.
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/CSharpResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5667,10 +5667,10 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<value>The syntax 'var' for a pattern is not permitted to refer to a type, but '{0}' is in scope here.</value>
</data>
<data name="WRN_SwitchExpressionNotExhaustive" xml:space="preserve">
<value>The switch expression does not handle all possible inputs (it is not exhaustive).</value>
<value>The switch expression does not handle all possible values of its input type (it is not exhaustive).</value>
</data>
<data name="WRN_SwitchExpressionNotExhaustive_Title" xml:space="preserve">
<value>The switch expression does not handle all possible inputs (it is not exhaustive).</value>
<value>The switch expression does not handle all possible values of its input type (it is not exhaustive).</value>
</data>
<data name="WRN_CaseConstantNamedUnderscore" xml:space="preserve">
<value>The name '_' refers to the constant, not the discard pattern. Use 'var _' to discard the value, or '@_' to refer to a constant by that name.</value>
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Výraz switch nezpracovává všechny možné vstupy (není vyčerpávající).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Výraz switch nezpracovává všechny možné vstupy (není vyčerpávající).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Výraz switch nezpracovává všechny možné vstupy (není vyčerpávající).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Výraz switch nezpracovává všechny možné vstupy (není vyčerpávající).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Der switch-Ausdruck verarbeitet nicht alle möglichen Eingaben (nicht umfassend).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Der switch-Ausdruck verarbeitet nicht alle möglichen Eingaben (nicht umfassend).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Der switch-Ausdruck verarbeitet nicht alle möglichen Eingaben (nicht umfassend).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Der switch-Ausdruck verarbeitet nicht alle möglichen Eingaben (nicht umfassend).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">La expresión switch no controla todas las entradas posibles (no es exhaustiva).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">La expresión switch no controla todas las entradas posibles (no es exhaustiva).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">La expresión switch no controla todas las entradas posibles (no es exhaustiva).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">La expresión switch no controla todas las entradas posibles (no es exhaustiva).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">L'expression switch ne prend pas en charge toutes les entrées possibles (elle n'est pas exhaustive).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">L'expression switch ne prend pas en charge toutes les entrées possibles (elle n'est pas exhaustive).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">L'expression switch ne prend pas en charge toutes les entrées possibles (elle n'est pas exhaustive).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">L'expression switch ne prend pas en charge toutes les entrées possibles (elle n'est pas exhaustive).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">L'espressione switch non gestisce tutti gli input possibili (non è esaustiva).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">L'espressione switch non gestisce tutti gli input possibili (non è esaustiva).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">L'espressione switch non gestisce tutti gli input possibili (non è esaustiva).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">L'espressione switch non gestisce tutti gli input possibili (non è esaustiva).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">switch 式がすべての可能な入力を処理しません (すべてを網羅していません)。</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">switch 式がすべての可能な入力を処理しません (すべてを網羅していません)。</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">switch 式がすべての可能な入力を処理しません (すべてを網羅していません)。</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">switch 式がすべての可能な入力を処理しません (すべてを網羅していません)。</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">switch 식은 가능한 입력을 모두 처리하지는 않습니다(전체 아님).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">switch 식은 가능한 입력을 모두 처리하지는 않습니다(전체 아님).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">switch 식은 가능한 입력을 모두 처리하지는 않습니다(전체 아님).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">switch 식은 가능한 입력을 모두 처리하지는 않습니다(전체 아님).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Wyrażenie switch nie obsługuje wszystkich możliwych danych wejściowych (nie jest kompletne).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Wyrażenie switch nie obsługuje wszystkich możliwych danych wejściowych (nie jest kompletne).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Wyrażenie switch nie obsługuje wszystkich możliwych danych wejściowych (nie jest kompletne).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Wyrażenie switch nie obsługuje wszystkich możliwych danych wejściowych (nie jest kompletne).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">A expressão switch não manipula todas as entradas possíveis (não é finita).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">A expressão switch não manipula todas as entradas possíveis (não é finita).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">A expressão switch não manipula todas as entradas possíveis (não é finita).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">A expressão switch não manipula todas as entradas possíveis (não é finita).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Выражение switch обрабатывает не все возможные входные данные (оно не полное).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Выражение switch обрабатывает не все возможные входные данные (оно не полное).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Выражение switch обрабатывает не все возможные входные данные (оно не полное).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Выражение switch обрабатывает не все возможные входные данные (оно не полное).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Switch ifadesi tüm olası girişleri işlemiyor (tam kapsamlı değil).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Switch ifadesi tüm olası girişleri işlemiyor (tam kapsamlı değil).</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Switch ifadesi tüm olası girişleri işlemiyor (tam kapsamlı değil).</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Switch ifadesi tüm olası girişleri işlemiyor (tam kapsamlı değil).</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Switch 表达式不会处理所有可能的输入(它并非详尽无遗)。</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Switch 表达式不会处理所有可能的输入(它并非详尽无遗)。</target>
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustiveForNull">
Expand All @@ -1788,8 +1788,8 @@
<note />
</trans-unit>
<trans-unit id="WRN_SwitchExpressionNotExhaustive_Title">
<source>The switch expression does not handle all possible inputs (it is not exhaustive).</source>
<target state="translated">Switch 表达式不会处理所有可能的输入(它并非详尽无遗)。</target>
<source>The switch expression does not handle all possible values of its input type (it is not exhaustive).</source>
<target state="needs-review-translation">Switch 表达式不会处理所有可能的输入(它并非详尽无遗)。</target>
<note />
</trans-unit>
<trans-unit id="WRN_ThrowPossibleNull">
Expand Down
Loading

0 comments on commit 35cc9bb

Please sign in to comment.