mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4724 from ethereum/slot-in-assembly
Do not crash on using _slot and _offset suffixes on their own
This commit is contained in:
@@ -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.
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user