diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-03-15 17:03:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 17:03:35 +0800 |
commit | d134fda0c05640992941087139316d2b8fb3f816 (patch) | |
tree | a26d7b2f78f6c167af83216545219d4e892f8e13 /libsolidity/ast/ASTAnnotations.h | |
parent | 64e00e5371e2620a0bbd945d37e799e1e0309668 (diff) | |
parent | 9f328ff749477106a569e679e5eeed5c7e78d29d (diff) | |
download | dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.tar dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.tar.gz dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.tar.bz2 dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.tar.lz dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.tar.xz dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.tar.zst dexon-solidity-d134fda0c05640992941087139316d2b8fb3f816.zip |
Merge pull request #1729 from ethereum/constantvariables
Only allow pure expressions for constant state variables.
Diffstat (limited to 'libsolidity/ast/ASTAnnotations.h')
-rw-r--r-- | libsolidity/ast/ASTAnnotations.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTAnnotations.h b/libsolidity/ast/ASTAnnotations.h index 9c4c3ae8..bd297f9e 100644 --- a/libsolidity/ast/ASTAnnotations.h +++ b/libsolidity/ast/ASTAnnotations.h @@ -156,6 +156,8 @@ struct ExpressionAnnotation: ASTAnnotation TypePointer type; /// Whether the expression is a constant variable bool isConstant = false; + /// Whether the expression is pure, i.e. compile-time constant. + bool isPure = false; /// Whether it is an LValue (i.e. something that can be assigned to). bool isLValue = false; /// Whether the expression is used in a context where the LValue is actually required. |