mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
The identifier var
should be fine in Yul
This commit is contained in:
parent
07ab4c80c4
commit
89ce2dbfe9
@ -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);
|
||||
|
10
test/libsolidity/semanticTests/viaYul/mapping_string_key.sol
Normal file
10
test/libsolidity/semanticTests/viaYul/mapping_string_key.sol
Normal 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" ->
|
Loading…
Reference in New Issue
Block a user