From 4c8f8e949143d0c680a8257adbcc768d908fae9a Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 15 Jan 2019 13:40:10 +0100 Subject: Disallow mismatching types in switch cases and detect duplicates by value for number literals. --- docs/yul.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/yul.rst b/docs/yul.rst index 31555742..627e6e7c 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -130,9 +130,10 @@ Restrictions on the Grammar --------------------------- Switches must have at least one case (including the default case). -If all possible values of the expression is covered, the default case should -not be allowed (i.e. a switch with a ``bool`` expression and having both a -true and false case should not allow a default case). +If all possible values of the expression are covered, a default case should +not be allowed (i.e. a switch with a ``bool`` expression that has both a +true and a false case should not allow a default case). All case values need to +have the same type. Every expression evaluates to zero or more values. Identifiers and Literals evaluate to exactly -- cgit v1.2.3