aboutsummaryrefslogtreecommitdiffstats
path: root/docs/yul.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-15 23:57:32 +0800
committerGitHub <noreply@github.com>2019-01-15 23:57:32 +0800
commit6146c59a1aa4c082226a6051aa89a28446b0041d (patch)
treecbaea6e325d355e4050f084936497a0816bb5bcc /docs/yul.rst
parentf9ca5b78fb41c18fe0b538d0be909c9026269fbd (diff)
parent4c8f8e949143d0c680a8257adbcc768d908fae9a (diff)
downloaddexon-solidity-6146c59a1aa4c082226a6051aa89a28446b0041d.tar.gz
dexon-solidity-6146c59a1aa4c082226a6051aa89a28446b0041d.tar.zst
dexon-solidity-6146c59a1aa4c082226a6051aa89a28446b0041d.zip
Merge pull request #5793 from ethereum/switchLiteralSameValue
[Yul] Require equal types for switch cases and detect duplicates by number value.
Diffstat (limited to 'docs/yul.rst')
-rw-r--r--docs/yul.rst7
1 files changed, 4 insertions, 3 deletions
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