diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2019-01-15 20:40:10 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2019-01-15 23:32:21 +0800 |
commit | 4c8f8e949143d0c680a8257adbcc768d908fae9a (patch) | |
tree | cbaea6e325d355e4050f084936497a0816bb5bcc /docs | |
parent | f9ca5b78fb41c18fe0b538d0be909c9026269fbd (diff) | |
download | dexon-solidity-4c8f8e949143d0c680a8257adbcc768d908fae9a.tar.gz dexon-solidity-4c8f8e949143d0c680a8257adbcc768d908fae9a.tar.zst dexon-solidity-4c8f8e949143d0c680a8257adbcc768d908fae9a.zip |
Disallow mismatching types in switch cases and detect duplicates by value for number literals.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/yul.rst | 7 |
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 |