diff options
author | chriseth <chris@ethereum.org> | 2018-06-29 18:27:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-29 18:27:29 +0800 |
commit | d469df45d8bbdee1dc7ba480e10bf8665c30198b (patch) | |
tree | 11766d320be376ad451201b01cf26a01531c9228 /test/libsolidity | |
parent | 2a9d54af587c300d9dc5984a796200795302137d (diff) | |
parent | 3cad417710bc95a66d801a432f33c3befee390c9 (diff) | |
download | dexon-solidity-d469df45d8bbdee1dc7ba480e10bf8665c30198b.tar.gz dexon-solidity-d469df45d8bbdee1dc7ba480e10bf8665c30198b.tar.zst dexon-solidity-d469df45d8bbdee1dc7ba480e10bf8665c30198b.zip |
Merge pull request #4352 from D-Nice/develop
Fixes storage ref var typo error from 'prefix' to 'suffix'
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol | 11 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/inlineAssembly/storage_reference_fine.sol | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol new file mode 100644 index 00000000..55c83674 --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol @@ -0,0 +1,11 @@ +contract C { + uint[] x; + function() public { + uint[] storage y = x; + assembly { + pop(y) + } + } +} +// ---- +// TypeError: (117-118): You have to use the _slot or _offset suffix to access storage reference variables. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_fine.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_fine.sol new file mode 100644 index 00000000..3ae24b34 --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_fine.sol @@ -0,0 +1,11 @@ +contract C { + uint[] x; + function() public { + uint[] storage y = x; + assembly { + pop(y_slot) + pop(y_offset) + } + } +} +// ---- |