mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix source location of yul multi-assignemnt.
This commit is contained in:
parent
d19aa2e51b
commit
b00014c51d
@ -11,6 +11,7 @@ Compiler Features:
|
||||
Bugfixes:
|
||||
* NatSpec: Do not consider ``////`` and ``/***`` as NatSpec comments.
|
||||
* Type Checker: Fix internal error related to ``using for`` applied to non-libraries.
|
||||
* Yul: Fix source location of variable multi-assignment.
|
||||
|
||||
|
||||
### 0.6.10 (2020-06-11)
|
||||
|
@ -175,7 +175,8 @@ Statement Parser::parseStatement()
|
||||
case Token::Comma:
|
||||
case Token::AssemblyAssign:
|
||||
{
|
||||
std::vector<Identifier> variableNames;
|
||||
Assignment assignment;
|
||||
assignment.location = locationOf(elementary);
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -197,7 +198,7 @@ Statement Parser::parseStatement()
|
||||
if (m_dialect.builtin(identifier.name))
|
||||
fatalParserError(6272_error, "Cannot assign to builtin function \"" + identifier.name.str() + "\".");
|
||||
|
||||
variableNames.emplace_back(identifier);
|
||||
assignment.variableNames.emplace_back(identifier);
|
||||
|
||||
if (currentToken() != Token::Comma)
|
||||
break;
|
||||
@ -207,10 +208,6 @@ Statement Parser::parseStatement()
|
||||
elementary = parseElementaryOperation();
|
||||
}
|
||||
|
||||
Assignment assignment;
|
||||
assignment.location = std::get<Identifier>(elementary).location;
|
||||
assignment.variableNames = std::move(variableNames);
|
||||
|
||||
expectToken(Token::AssemblyAssign);
|
||||
|
||||
assignment.value = make_unique<Expression>(parseExpression());
|
||||
|
@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
function f() pure public {
|
||||
uint x; uint y;
|
||||
assembly { x, y := 7 }
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError: (87-96): Variable count does not match number of values (2 vs. 1)
|
Loading…
Reference in New Issue
Block a user