diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-07 18:23:00 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-07 19:14:12 +0800 |
commit | 296ba24f7f14811c5a5482457391d4f1afa49a87 (patch) | |
tree | 578510afaf0adb4bdb932cc29c6177b851bce06c /test/libsolidity | |
parent | d33e5683f51dc9d85b4493abbf6f03f6ab7b8ff2 (diff) | |
download | dexon-solidity-296ba24f7f14811c5a5482457391d4f1afa49a87.tar.gz dexon-solidity-296ba24f7f14811c5a5482457391d4f1afa49a87.tar.zst dexon-solidity-296ba24f7f14811c5a5482457391d4f1afa49a87.zip |
Do not crash on using _slot and _offset suffixes on their own
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol | 9 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol new file mode 100644 index 00000000..ec23a263 --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol @@ -0,0 +1,9 @@ +contract C { + function f() public pure { + assembly { + _offset + } + } +} +// ---- +// DeclarationError: (75-82): In variable names _slot and _offset can only be used as a suffix. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol new file mode 100644 index 00000000..d493a68a --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol @@ -0,0 +1,9 @@ +contract C { + function f() public pure { + assembly { + _slot + } + } +} +// ---- +// DeclarationError: (75-80): In variable names _slot and _offset can only be used as a suffix. |