From c99ec1654452eede8b374eb85cb05b2e759be23f Mon Sep 17 00:00:00 2001 From: Araq <rumpf_a@web.de> Date: Thu, 2 Oct 2014 10:08:41 +0200 Subject: deprecated string case statements without 'else' --- doc/tut1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tut1.txt') diff --git a/doc/tut1.txt b/doc/tut1.txt index 2a836190c..950f758f1 100644 --- a/doc/tut1.txt +++ b/doc/tut1.txt @@ -312,7 +312,7 @@ the compiler that for every other value nothing should be done: The empty `discard statement`_ is a *do nothing* statement. The compiler knows that a case statement with an else part cannot fail and thus the error disappears. Note that it is impossible to cover all possible string values: -that is why there is no such check for string cases. +that is why string cases always need an ``else`` branch. In general the case statement is used for subrange types or enumerations where it is of great help that the compiler checks that you covered any possible -- cgit 1.4.1-2-gfad0