Merge pull request #8486 from ethereum/fix_sol_yul_var

Fix variable name in Sol -> Yul
This commit is contained in:
chriseth 2020-03-11 21:14:51 +01:00 committed by GitHub
commit a6a5d13ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -324,6 +324,7 @@ Parser::ElementaryOperation Parser::parseElementaryOperation()
case Token::Byte:
case Token::Bool:
case Token::Address:
case Token::Var:
{
YulString literal{currentLiteral()};
if (m_dialect.builtin(literal))
@ -513,6 +514,7 @@ YulString Parser::expectAsmIdentifier()
case Token::Address:
case Token::Bool:
case Token::Identifier:
case Token::Var:
break;
default:
expectToken(Token::Identifier);

View File

@ -0,0 +1,10 @@
contract C {
mapping (string => uint) map;
function set(string memory s) public {
map[s];
}
}
// ====
// compileViaYul: true
// ----
// set(string): 0x20, 32, "01234567890123456789012345678901" ->