diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-07 21:16:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 21:16:43 +0800 |
commit | 4158a310bde90abe83cb61a071d5c7cdc9064593 (patch) | |
tree | 3a13e6e923ee93fe488788235a32ddc2078fac54 /test | |
parent | 9d3827266cc734ac91368acff010e094f100f850 (diff) | |
parent | 05cc7e79e1bf484c71ce93510fbfbf2c3e415cc6 (diff) | |
download | dexon-solidity-4158a310bde90abe83cb61a071d5c7cdc9064593.tar.gz dexon-solidity-4158a310bde90abe83cb61a071d5c7cdc9064593.tar.zst dexon-solidity-4158a310bde90abe83cb61a071d5c7cdc9064593.zip |
Merge pull request #4729 from ethereum/slot-on-non-storage
Properly handle invalid references used together with _slot and _offset.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol new file mode 100644 index 00000000..9165654f --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol @@ -0,0 +1,9 @@ +contract C { + function f() pure public { + assembly { + let x := f_slot + } + } +} +// ---- +// TypeError: (84-90): The suffixes _offset and _slot can only be used on storage variables. |