mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly handle invalid references used together with _slot and _offset.
This commit is contained in:
parent
8b2d630275
commit
eb7b3862ac
@ -83,6 +83,7 @@ Bugfixes:
|
||||
* Fix NatSpec json output for `@notice` and `@dev` tags on contract definitions.
|
||||
* References Resolver: Do not crash on using ``_slot`` and ``_offset`` suffixes on their own.
|
||||
* References Resolver: Enforce ``storage`` as data location for mappings.
|
||||
* References Resolver: Properly handle invalid references used together with ``_slot`` and ``_offset``.
|
||||
* References Resolver: Report error instead of assertion fail when FunctionType has an undeclared type as parameter.
|
||||
* Type Checker: Disallow assignments to mappings within tuple assignments as well.
|
||||
* Type Checker: Allow assignments to local variables of mapping types.
|
||||
|
@ -262,6 +262,8 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
|
||||
return size_t(-1);
|
||||
}
|
||||
declarations = m_resolver.nameFromCurrentScope(realName);
|
||||
if (!dynamic_cast<VariableDeclaration const*>(declarations.front()))
|
||||
return size_t(-1);
|
||||
}
|
||||
if (declarations.size() != 1)
|
||||
return size_t(-1);
|
||||
|
@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f() pure public {
|
||||
assembly {
|
||||
let x := f_slot
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError: (84-90): Identifier not found.
|
Loading…
Reference in New Issue
Block a user